Docs Build and deployment
Build and deployment
How the site builds and deploys itself through GitHub Actions, with no manual publish step.
The site builds and deploys itself. There is no manual publish step: every push to
main produces a new live deploy.
The pipeline
On every push to main (and on a manual trigger), the workflow at
.github/workflows/pages.yml runs:
- Checkout the repository.
- Set up Ruby (3.3) with bundler caching, installing the
Gemfilegems. - Configure Pages to provide the correct base path.
- Build with
bundle exec jekyll buildunderJEKYLL_ENV=production. - Upload the built
_site/as a Pages artifact. - Deploy the artifact to the
github-pagesenvironment.
Building with the project’s own Bundler and Jekyll — rather than GitHub’s built-in
Pages-gem build — means the site is not limited to GitHub’s plugin allowlist:
any Jekyll version and any plugin listed in the Gemfile works.
Hosting and the custom domain
The repository is a GitHub user site (junebug12851.github.io, where the
repository name is literally <username>.github.io), so it serves at the domain
root. The committed CNAME points the fairyfox.io custom domain at it. Because
the custom domain is set on the user site, each project’s own GitHub Pages site is
served under the same domain — for example, fairyfox.io/pokered-save-editor-2/ —
so navigation can lead straight into a project’s documentation.
One-time setup, for reference: the Pages source is set to “GitHub Actions” (not “deploy from a branch”); DNS points the apex domain at GitHub Pages; and HTTPS is enforced once the certificate issues.
Verifying a deploy
A failed build publishes nothing — the previous deploy stays live — so problems are
fixed forward and pushed again. Deploys can be watched with the GitHub CLI
(gh run watch).
Local preview
bundle install
bundle exec jekyll serve # http://127.0.0.1:4000
For a production-equivalent build, JEKYLL_ENV=production bundle exec jekyll build.