Skip to main content

0003: Host the docs on Cloudflare Pages

Status: Accepted Date: 2026-12-03

Context​

The docs site (ADR 0002) only ran locally, so reading it meant cloning the repo and running .\vesper docs. The repo is private, and GitHub Pages needs a paid plan to publish from a private repo.

Decision​

Cloudflare Pages builds and hosts docs/ through its GitHub integration: every push to main publishes https://vesper-docs.pages.dev, and every other branch gets a preview URL. Cloudflare runs the build, so the repo holds no deploy workflow or API tokens. Access is limited with Cloudflare Access (Zero Trust), and static/_headers keeps search engines out.

Alternatives considered​

  • GitHub Pages: needs a paid plan for a private repo, and can't restrict who reads the site.
  • A GitHub Actions workflow running wrangler pages deploy: gives more control, but needs a Cloudflare API token stored in GitHub, and Pages' own integration already does the job.
  • Netlify: similar, but its free plan has no equivalent of Access for limiting who can read the site.

Consequences​

  • The docs are readable without a clone, and each PR shows a preview link.
  • Build settings live in the Cloudflare dashboard, not the repo (see Writing docs). Only the Node version (docs/.node-version) and headers (docs/static/_headers) are in git.
  • Without an Access policy the pages.dev URL is public. Set up Access before sharing the link.
  • We'd move to a workflow if deploys ever need steps Cloudflare's build can't run.