Deployment¶
Container image¶
The frontend ships as a container image published to the GitHub Container Registry (GHCR) at ghcr.io/mcfilu/grinsystem-front. The image is the runtime stage of the Dockerfile — nginx serving Vite's dist/. Both the build and the push reuse the same language-agnostic build-and-push.yml workflow the backend uses (mcfilu/python-reusable-actions), so image building behaves identically across both repos.
- Every release (cut by release-please) builds and pushes the image, tagged with the release version (e.g.
:0.1.0) and:latest. This is thebuild-and-pushjob in.github/workflows/merge-main.yml, gated onrelease_created == 'true'. - Every PR builds the
runtimetarget withpush: falseto catch Dockerfile regressions before they reachmain. This is theDocker Build Checkjob in.github/workflows/pr-checks.yml, which also reports into the PR checks summary table. - The image is built for
linux/amd64only — the deploy target is an x86 server, so no multi-arch/QEMU build is performed. - Buildx layer caching (
type=gha) keeps CI build times reasonable across runs.
Docs site¶
This documentation site is published to GitHub Pages with mike, which keeps multiple versions side by side and powers the version dropdown in the header. The setup mirrors the backend's docs pipeline.
How versioning works¶
Deployment is automated by the deploy-docs job in .github/workflows/merge-main.yml, which calls the reusable mike-deploy.yml workflow in mcfilu/node-reusable-actions.
- Every push to
mainpublishes the in-flight docs under themainversion (mike deploy main). - Every release (cut by release-please) publishes that version and repoints the
latestalias to it (mike deploy --update-aliases <version> latest), then makeslatestthe default the bare site URL redirects to (mike set-default latest). mikemaintainsversions.jsonon thegh-pagesbranch — this drives the version selector. The selector only appears on the deployed site, never in localmkdocs serve.- Aliases (
main,latest) are pointers; each deploy repoints them. Thegh-pagesCNAMEfile is never touched bymike.
One-time custom-domain setup¶
The site is served at fe-docs.grintest.pl. This is configured once, outside the repo.
1. Cloudflare DNS (grintest.pl zone)¶
Add a CNAME record:
| Field | Value |
|---|---|
| Type | CNAME |
| Name | fe-docs |
| Target | mcfilu.github.io |
| Proxy status | DNS only (grey cloud — not proxied) |
2. GitHub Pages (repo settings)¶
The gh-pages branch is created by the first successful deploy-docs run (i.e. after the first merge to main following this change). Once it exists:
- Settings → Pages → Build and deployment → Source: Deploy from a branch →
gh-pages// (root). - Custom domain: set to
fe-docs.grintest.pland save. GitHub writes aCNAMEfile to the root ofgh-pages. - Wait for the DNS check to pass, then tick Enforce HTTPS (Let's Encrypt is provisioned automatically).
mike redeploys never overwrite the root CNAME. If it is ever lost, re-save the custom domain in the Pages settings to restore it.
Local preview¶
Open http://127.0.0.1:8000/. To exercise mike locally without touching the real branch: