Skip to content

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

  1. Open Cloudflare.
  2. Go to Workers & Pages.
  3. Create a Pages project.
  4. Connect the GitHub repository:

text the-platform-layer/harrier-emr-mcp

  1. Use the build settings above.
  2. Deploy once and confirm the default Pages URL works:

text https://harrier-docs.pages.dev

Custom Domain

In the harrier-docs Pages project:

  1. Open Custom domains.
  2. Add:

text docs.harrier.theplatformlayer.com

  1. 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

  1. Wait for Cloudflare domain verification and SSL issuance.
  2. 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.