Cloudflare Pages Docs Deployment
Harrier's documentation site is built with MkDocs Material and is intended to run at:
https://docs.harrier.theplatformlayer.com
For the combined website and docs domain checklist, see Harrier domain setup.
Build Settings
Use these settings when creating the Cloudflare Pages project:
| Setting | Value |
|---|---|
| Project name | harrier-docs |
| Production branch | main |
| Build command | python -m pip install -r docs/requirements.txt && python -m mkdocs build --strict |
| Build output directory | site |
| Root directory | repository root |
The same build is available locally:
make docs-build
GitHub Actions Deployment
The repository includes .github/workflows/deploy-docs.yml.
Required GitHub secrets:
CLOUDFLARE_API_TOKEN
CLOUDFLARE_ACCOUNT_ID
Recommended Cloudflare API token permissions:
Account / Cloudflare Pages / Edit
The workflow deploys the generated site/ directory to the Cloudflare Pages project:
harrier-docs
Manual Cloudflare Setup
- Open Cloudflare.
- Go to Workers & Pages.
- Create a Pages project.
- Connect the GitHub repository:
text
the-platform-layer/harrier-emr-mcp
- Use the build settings above.
- Deploy once and confirm the default Pages URL works:
text
https://harrier-docs.pages.dev
Custom Domain
In the harrier-docs Pages project:
- Open Custom domains.
- Add:
text
docs.harrier.theplatformlayer.com
- Because Cloudflare is authoritative DNS, add or confirm this CNAME in Cloudflare DNS:
text
Type: CNAME
Name: docs.harrier
Value: harrier-docs.pages.dev
TTL: 1 hour
- Wait for Cloudflare domain verification and SSL issuance.
- Verify:
bash
dig docs.harrier.theplatformlayer.com CNAME +short
curl -I https://docs.harrier.theplatformlayer.com
Troubleshooting
| Symptom | Check |
|---|---|
| Cloudflare says domain is pending | Confirm the Cloudflare DNS CNAME exactly targets harrier-docs.pages.dev. |
| Browser shows SSL error | Wait for certificate issuance, then retry with https://. |
| Site serves an old version | Check the Deploy Docs workflow run and the Cloudflare Pages deployment history. |
| MkDocs build fails | Run make docs-build locally and fix strict-mode warnings. |