In Settings → Branches → Add rule for main:
- Require a pull request before merging (1 approval).
- Require status checks to pass: the CI workflow (
typecheck · format · build · redact). - Require branches to be up to date before merging.
- Require review from Code Owners (enforces
CODEOWNERS). - Do not allow bypassing the above.
This makes the redaction gate and the type-check unskippable — you cannot merge content that leaks a secret or breaks a cross-reference.
- Settings → Pages → Build and deployment → Source: GitHub Actions.
- Push to
main. Thedeploy.ymlworkflow builds with Astro and publishes. - The URL is
https://<owner>.github.io/<repo>/. Keepsite/baseinastro.config.mjsin sync with it.
Set site to your domain and base to / in astro.config.mjs, add a public/CNAME
containing the domain, and configure the domain in Settings → Pages.
A GitHub Pages site is publicly reachable by default, even from a private repo — private Pages access control requires GitHub Enterprise Cloud. So treat "the repo is private" as not equivalent to "the site is private."
Safe rollout:
- Build and iterate while the repo is private and Pages is not enabled (or deploy only to a non-public preview).
- Run the publishing checklist —
redact:checkclean, every content change read by a human for sanitization. - Only then enable Pages / make the repo public.
Never assume privacy from repo visibility alone.