Host static sites or frontend builds (HTML/CSS/JS, React/Next static export) for free on GitHub Pages.
- Repo: Push your project to a GitHub repository. Ensure the build output (e.g.
dist/,out, orbuild/) is generated bynpm run buildorpnpm run build. - Settings: In the repo go to Settings → Pages. Under "Build and deployment" choose "GitHub Actions" (recommended) or deploy from a branch (e.g.
main→/rootor/docs). - GitHub Actions: Add a workflow file (e.g.
.github/workflows/deploy.yml) that runspnpm install && pnpm run buildand uploads the build artifact to thegh-pagesbranch or usespeaceiris/actions-gh-pages. The site will be athttps://<username>.github.io/<repo>/. - Custom domain (optional): Add a CNAME record pointing to
<username>.github.ioand set the custom domain in Pages settings.
Ideal for project demos, portfolios, and static frontends; not for dynamic backends or databases.