Static sites without leaving GitHub
GitHub Pages serves a static site directly from a repo. With Actions, you build the site (Hugo, Jekyll, mdBook, Astro, etc.) in CI and publish via the official actions/deploy-pages action.
Setup
- Repo Settings → Pages → Source: GitHub Actions.
- Workflow that builds the site, uploads it as a Pages artifact, then deploys.
- Optional: custom domain, HTTPS.
The canonical workflow
Three actions: actions/checkout, actions/upload-pages-artifact, actions/deploy-pages. Permissions need pages: write and id-token: write.