This runbook standardizes the full docs delivery flow for NoteConnection from MkDocs build to GitHub Pages deployment, including rollback and 404 troubleshooting.
- Repository:
NoteConnection - Docs stack:
MkDocs (Material) - Delivery channel: GitHub Pages project site (
gh-pagesbranch) - Public URL:
https://jacobinwwey.github.io/NoteConnection/
If https://jacobinwwey.github.io/NoteConnection/ returns 404 even when CI is green, Pages is usually not enabled yet.
- Enable Pages source once:
- GitHub UI:
Settings -> Pages - Build and deployment:
- Source:
Deploy from a branch - Branch:
gh-pages - Folder:
/ (root)
- Source:
- GitHub UI:
- Optional CLI bootstrap (maintainer):
gh api -X POST repos/Jacobinwwey/NoteConnection/pages \
-f source[branch]=gh-pages \
-f source[path]=/- Verify:
gh api repos/Jacobinwwey/NoteConnection/pages
curl -I https://jacobinwwey.github.io/NoteConnection/Expected status: built and HTTP 200.
Workflow file:
.github/workflows/docs-github-pages-publish.yml
Behavior:
- Auto-trigger on
pushtomain/masterwhen docs-related files change. - Manual trigger via
workflow_dispatchsupports:git_ref(branch/tag/commit for rollback publish)site_url(optional override)base_path(optional override)
npm run docs:diataxis:check
npm run docs:site:buildBuild output: build/mkdocs-site.
- Open
Docs GitHub Pages Publishworkflow. - Click
Run workflow. - Set
git_refto a stable tag/commit (for examplev1.6.6). - Keep
site_urlandbase_pathaligned with production. - Run workflow and validate the site URL.
git checkout <stable-tag-or-commit>
npm ci
npm run docs:diataxis:check
npm run docs:site:buildThen run Method A with the same git_ref.
- Check workflow result:
Docs GitHub Pages Publishmust be green.
- Check
gh-pagesbranch exists and containsindex.html. - Check Pages API status:
gh api repos/Jacobinwwey/NoteConnection/pages
- If API returns
404 Not Found:- Pages is not enabled for the repo yet. Enable with bootstrap step above.
- If API is
builtbut page still fails:- Wait 1-5 minutes for CDN propagation and retry with cache-disabled browser.
- Keep
docs/diataxis-map.json,mkdocs.yml, and workflow config in sync. - Treat docs publish as a release artifact with auditable metadata (tag, URL, timestamp).
- Always keep one known-good rollback tag ready before major docs updates.