Skip to content

ci: auto-deploy docs to Cloudflare Pages#62

Merged
ProKil merged 1 commit into
mainfrom
docs-cloudflare-deploy
May 21, 2026
Merged

ci: auto-deploy docs to Cloudflare Pages#62
ProKil merged 1 commit into
mainfrom
docs-cloudflare-deploy

Conversation

@ProKil
Copy link
Copy Markdown
Member

@ProKil ProKil commented May 21, 2026

Problem

PR #59 adds docs/team_harness_ablation_report.html but it was never auto-deployed — because CooperBench has no docs-deployment pipeline:

  • The repo's original .github/workflows/docs.yaml (MkDocs + mike) was deleted in b61bc00 ("Updating linter"). It was unconfigured cookiecutter scaffolding anyway (referenced a placeholder src/your_package_name/__about__.py, needed a mkdocs.yml that never existed).
  • GitHub Pages is still "enabled" but points at a gh-pages branch that doesn't exist, so the live site (cooperbench.github.io/CooperBench/) currently returns 404.

Fix

Add a Cloudflare Pages workflow modeled on cooperbench/CooperTrain's deploy-report.yml:

  • Triggers on push to main and PRs touching docs/** (plus workflow_dispatch).
  • Generates a docs/index.html landing page listing every docs/*.html report (title pulled from each file's <h1>, newest first, LATEST badge).
  • Deploys the docs/ directory to the Cloudflare Pages project cooperbench-reports.
  • PRs get a preview deployment + a comment with the preview URL.

The report is self-contained HTML (inline CSS, no runtime data fetches), so no static-site generator is needed.

⚠️ Required before it works: secrets

CooperBench has no Cloudflare secrets yet. The deploy step skips gracefully (green, with a warning) until both are set — same token/account CooperTrain uses:

gh secret set CLOUDFLARE_API_TOKEN  --repo cooperbench/CooperBench
gh secret set CLOUDFLARE_ACCOUNT_ID --repo cooperbench/CooperBench

(Or promote them to org-level secrets so both repos share them.)

Notes / decisions

  • Separate Pages project (cooperbench-reports), not CooperTrain's cooperbench-train-reports: each Cloudflare Pages deploy replaces the whole project's content, so reusing CooperTrain's project would clobber its reports. This keeps both on the same Cloudflare account (shared secrets) but on distinct sites. Rename the --project-name if you'd rather merge them.
  • Deploys the whole docs/ dir, so docs/team_harness_ablation_report.html lands at cooperbench-reports.pages.dev/team_harness_ablation_report. PR docs: team-harness ablation report (flash, codex/gpt-5.5) #59's report deploys automatically once both this and docs: team-harness ablation report (flash, codex/gpt-5.5) #59 are on main.

🤖 Generated with Claude Code

CooperBench had no docs-deployment pipeline — the original template
docs.yaml (MkDocs + mike) was deleted in b61bc00, and GitHub Pages
points at a non-existent gh-pages branch (live site 404s). So
docs/*.html (e.g. the team-harness ablation report from PR #59) never
get published.

Add a Cloudflare Pages workflow modeled on cooperbench/CooperTrain's
deploy-report.yml: on push to main (and PRs) touching docs/**, it
generates a docs/index.html listing every docs/*.html report and
deploys the docs/ dir to the Cloudflare Pages project
"cooperbench-reports". PRs get a preview deployment + comment.

Requires CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID secrets (same
ones CooperTrain uses). Until they're set on this repo, the deploy
step skips with a warning so PR checks stay green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ProKil ProKil merged commit 220bf57 into main May 21, 2026
5 checks passed
@ProKil ProKil deleted the docs-cloudflare-deploy branch May 21, 2026 20:57
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