GitHub Pages Setup¶
This document describes how the BookingZone platform documentation is published via GitHub Pages from this repository.
Overview¶
| Setting | Value |
|---|---|
| Site URL (current) | https://aerospace-apps.github.io/bz-platform-context |
| Site URL (future) | https://docs.prod.bookingzone.com (after DNS configured) |
| Source | GitHub Actions (not branch-based) |
| Visibility | Private (org members only) |
| Static Site Generator | MkDocs with Material theme |
How It Works¶
- Source of truth: All documentation lives in this repo as Markdown files.
- Build: The
deploy-pages.ymlworkflow runs MkDocs to generate a static site. - Deploy: The workflow uploads the built site to the
github-pagesenvironment. - Custom domain: Not enabled yet — requires DNS setup first (see below).
Files Involved¶
| File | Purpose |
|---|---|
mkdocs.yml |
MkDocs configuration: theme, plugins, navigation |
site-src/index.md |
Site home page |
.github/workflows/deploy-pages.yml |
Build and deploy workflow |
.gitignore |
Excludes site/ (build output) from version control |
Workflow Triggers¶
The deploy-pages.yml workflow runs on:
- Push to
main: Automatic deployment on merge - Manual dispatch: Run anytime via Actions → "Deploy to GitHub Pages" → Run workflow
Admin Setup (One-Time)¶
After merging, Anil (or a repo admin) must complete these steps in the GitHub UI:
1. Enable GitHub Pages¶
- Go to Settings → Pages in this repository.
- Under Build and deployment, set Source to GitHub Actions.
- Click Save.
2. Set Visibility to Private¶
- On the same Settings → Pages page, find Visibility.
- Select Private (requires GitHub Team plan; org already has this).
- Click Save.
Private visibility means only authenticated org members can access the site. The repo does not need to be public.
At this point, the site is live at: https://aerospace-apps.github.io/bz-platform-context
Custom Domain Setup (Later — After DNS Is Ready)¶
Important: Do NOT configure the custom domain in GitHub Pages until DNS is set up. Adding a custom domain without DNS causes the github.io URL to 404.
Step 1: Configure DNS First¶
Add this CNAME record to your DNS provider:
| Type | Name | Value |
|---|---|---|
| CNAME | docs.prod |
aerospace-apps.github.io |
Wait for DNS propagation (verify with dig docs.prod.bookingzone.com or similar).
Step 2: Add CNAME File to Repo¶
Once DNS is working, add the CNAME file:
echo "docs.prod.bookingzone.com" > site-src/CNAME
git add site-src/CNAME
git commit -m "feat: enable custom domain for GitHub Pages"
git push
Step 3: Configure Custom Domain in GitHub¶
- On Settings → Pages, under Custom domain, enter:
- Click Save.
- GitHub will verify the domain (already verified at org level).
Step 4: Enforce HTTPS¶
- Once the custom domain shows "verified", check Enforce HTTPS.
- GitHub provisions a TLS certificate automatically.
Step 5: Update mkdocs.yml¶
Update site_url in mkdocs.yml:
The domain
docs.prod.bookingzone.comis already verified at the org level in Organization Settings → Pages → Verified domains.
Local Development¶
To preview the site locally:
# Install dependencies
pip install mkdocs-material pymdown-extensions
# Serve with live reload
mkdocs serve
# Build static site
mkdocs build
The site will be available at http://127.0.0.1:8000.
Troubleshooting¶
Build fails with "file not found"¶
- Check that all paths in
mkdocs.ymlnav match actual file locations. - Run
mkdocs build --strictlocally to catch issues.
Custom domain not working¶
- Verify the CNAME DNS record points to
aerospace-apps.github.io. - Check Settings → Pages shows the domain as verified.
- Wait for DNS propagation (up to 24 hours, usually much faster).
Site not updating after merge¶
- Check the Actions tab for workflow failures.
- Ensure the
github-pagesenvironment exists and has correct permissions.
Content Authoring¶
All content lives in the existing repo structure:
adrs/— Architecture Decision Recordsconstitution/— System constitutiondocs/— Process documentationglossary/— Domain terminologyspecs/— Cross-cutting feature specs
Edit Markdown files directly. MkDocs handles YAML frontmatter gracefully (strips
it from rendered pages via the meta extension).
To add a new page to the navigation, edit the nav: section in mkdocs.yml.