GitHub Pages

GitHub Pages hosts a static site next to its source, free for public repositories, and since deployments from Actions artifacts it publishes the output of any generator rather than only Jekyll. The guides below cover publishing Hugo, Astro, Eleventy, Jekyll and VitePress through one reusable workflow, getting base paths right for project sites, and moving to a custom domain with enforced HTTPS.

Pages has gaps compared with commercial static hosts, and two guides work around the most felt of them: it has no pull request previews, so one guide adds them through a second host or a second Pages site, and it cannot set response headers, which shapes how the other guides handle redirects and security.

Steps shared by every GitHub Pages deploy Four steps. Configure Pages to get the base path. Build with that base path. Upload the output as a Pages artifact. Deploy to the github-pages environment. Publishing to GitHub Pages from any generator configure-pages base path Build per generator Upload artifact output folder Deploy github-pages env
Only the build step differs between generators.

Choosing the Right Static Site Generator for Production

Number of GitHub Pages guides of each kind Vertical bars: How-tos 6, Fixes 0, Comparisons 0 and Concepts 0. GitHub Pages guides by kind 6 How-tos 0 Fixes 0 Comparisons 0 Concepts
6 guides use GitHub Pages in depth; each is listed below under the section it belongs to.

Production-Ready Deployment & CI/CD for SSGs

Topics with the most GitHub Pages guides Horizontal bars, largest first: Jekyll Plugin Ecosystem 3, GitHub Actions for Automated SSG Builds 2 and Preview Environments for Pull Requests 1. Where GitHub Pages comes up Jekyll Plugin Ecosystem 3 GitHub Actions for Automated SSG Builds 2 Preview Environments for Pull Requests 1
Topic pages give the wider context for each group; the numbers count only guides that use this tool in depth.

Often used with GitHub Pages

  • Jekyll3 shared guidesPlugins, reproducible builds, upgrades and migration away.
  • GitHub Actions3 shared guidesCaching, matrix builds, reusable workflows and pinning.