Skip to content

🔨 Add Cloudflare Pages docs deploy (parallel to RtD)#2

Merged
lucasrodes merged 2 commits into
mainfrom
add-cf-pages-deploy
May 19, 2026
Merged

🔨 Add Cloudflare Pages docs deploy (parallel to RtD)#2
lucasrodes merged 2 commits into
mainfrom
add-cf-pages-deploy

Conversation

@lucasrodes
Copy link
Copy Markdown
Member

Written by Claude Code — @lucasrodes at the wheel.

Stands up a parallel Cloudflare Pages deploy of the umbrella docs at owid-docs.pages.dev, alongside the existing RtD and GitHub Pages builds (both untouched). Mirrors the pattern just landed in owid/etl for the ETL subproject.

Workflow .github/workflows/deploy-docs-cf.yml
CF project owid-docs (Direct Upload, production branch = main)
Staging URL https://owid-docs.pages.dev/
RtD unchanged — .readthedocs.yml, zensical.toml, docs/ all untouched
GH Pages unchanged — existing docs.yml workflow continues

Before merging — manual setup

  1. Create the CF Pages project via CLI (the dashboard's "Upload static files" flow now creates a Worker, not a Pages project):
    npx wrangler pages project create owid-docs --production-branch=main
  2. Add the same secrets used in the etl repo: CLOUDFLARE_API_TOKEN, CLOUDFLARE_ACCOUNT_ID. Settings → Secrets and variables → Actions → New repository secret.
  3. After first successful deploy, no custom-domain attachment yet — that's deferred until the cut-over plan is in place (see below).

Cut-over architecture (out of scope here)

docs-cf.owid.io is currently bound to the owid-etl-docs project for /projects/etl/. Two Pages projects can't share one custom domain, so unifying them under one URL needs a small CF Worker that routes:

  • docs-cf.owid.io/projects/etl/*owid-etl-docs.pages.dev
  • everything else → owid-docs.pages.dev

That's a separate piece of work once both projects are healthy on their pages.dev URLs.

lucasrodes and others added 2 commits May 19, 2026 14:39
Parallel to ReadTheDocs and GitHub Pages. Builds with zensical and
uploads via wrangler to a new owid-docs CF Pages project. Mirrors the
same pattern owid/etl is using for its docs subproject.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Routes incoming requests on the umbrella custom domain so
/projects/etl/* is served from the owid-etl-docs Pages project while
everything else falls through to this project's own static assets.
Lets one custom domain serve docs from both repos transparently.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@lucasrodes lucasrodes marked this pull request as ready for review May 19, 2026 12:57
@lucasrodes lucasrodes merged commit b6396f2 into main May 19, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant