GitHub Pages publishing for the NutsNews wiki
Section titled “GitHub Pages publishing for the NutsNews wiki”The repository is the source of truth. Astro builds the docs into static files, and GitHub Actions publishes only a checked artifact.
Where the wiki is now
Section titled “Where the wiki is now”- Public URL:
https://wiki.nutsnews.com/ - GitHub Pages uses the custom domain and enforced HTTPS.
Do not edit _site/, generated content, reports, caches, or the live Pages files.
What happens after a NutsNews merge
Section titled “What happens after a NutsNews merge”Every five minutes, one central workflow checks all active public nutsnews* repositories for newly merged pull requests. New matching repositories are included automatically.
- It gathers the merged PR facts and changed-file patches.
- Codex updates a repository merge log and any wiki guide made stale by the merge.
- Codex has no GitHub write token and cannot publish by itself.
- A fixed safety step rejects deleted files, tooling edits, or incomplete document bundles.
- The workflow records the source repository, PR numbers, merge commit, workflow run, and source hash.
- Every content, link, diagram, secret, and build check must pass.
- Only then does the workflow commit to
mainand start a Pages deployment.
Failures do not advance the merge cursor and are reported as GitHub issues. The same merge batch gets at most three attempts, which prevents endless API spending. A later merge automatically starts the repository again and includes all changes that are still waiting.
Preview and check locally
Section titled “Preview and check locally”npm cinpm run dev -- --host 127.0.0.1 --port 4321For a production preview:
npm run buildnpm run preview -- --host 127.0.0.1 --port 4321Run the documentation and browser gates:
npm run wiki:preparenpm run validate:contentnpm run validate:linksnpm run validate:mermaidnpm run test:content-routesnpm run test:workflownpm run test:pages-artifactnpm run test:browsernpm run buildWhat Actions does
Section titled “What Actions does”Pull requests run checks but never deploy.
A push or manual run on main follows this order:
- Check at least the original 227 sources plus every later source, both mirror sets, approvals, diagrams, links, secrets, routes, build, budgets, accessibility, keyboard flows, and screenshots.
- Mark the exact commit as ready only after every check passes.
- Check out that same commit in the Pages build.
- Build, stamp, and inspect the final artifact.
- Upload it.
- Deploy it from the
main-only Pages environment.
Only deployment can write to Pages. The workflow does not use a repository secret or an OpenAI key.
Launch order
Section titled “Launch order”-
Finish every platform and local QA gate. Smoke-test the default URL.
-
Prepare and fully validate the production-target site-code pull request, but do not merge it.
-
In Cloudflare, change only this record:
Type Name Target Proxy CNAME wikiramideltoro.github.ioDNS only Do not change any other DNS record.
-
Merge the ready production-target pull request and wait for its root artifact to deploy.
-
Set the repository Pages custom domain to
wiki.nutsnews.com. -
Wait for GitHub’s certificate, then turn on Enforce HTTPS.
-
Test the release stamp, root, both audiences, search/History, diagrams, 404, and nested pages.
Rollback
Section titled “Rollback”Rollback verification contract
Section titled “Rollback verification contract”Record the last-good commit SHA first. Verify https://wiki.nutsnews.com serves it after a production rollback and test both audiences; after a cutover fallback, verify the default project URL instead.
For a bad production release, revert or rerun the last good commit, require every gate, confirm release.json, and smoke the affected routes.
For a failed domain cutover:
- Redeploy the last pre-cutover
/nutsnews-docsartifact. - Remove the repository custom domain and verify the default URL.
- Remove or correct only the
wikiCNAME if DNS caused the failure. - Leave every other DNS record unchanged and repeat the full gate.
When something fails
Section titled “When something fails”- Quality: check approval, inventory, mirrors, diagrams, links, or browser results.
- Build: check the exact commit, site/base, Astro, Pagefind, and budgets.
- Artifact: check the stamp and blocked secret/env/source/CNAME files.
- Deploy: check the
mainenvironment, Pages status, permissions, and artifact. - Domain: check the one DNS-only CNAME, custom-domain status, certificate, and HTTPS.
Fix the source and rerun. Do not edit deployed HTML or use .wiki-build, wiki-push, Jekyll, or bundle commands.
