ci: auto-deploy docs to Cloudflare Pages#62
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
PR #59 adds
docs/team_harness_ablation_report.htmlbut it was never auto-deployed — because CooperBench has no docs-deployment pipeline:.github/workflows/docs.yaml(MkDocs +mike) was deleted inb61bc00("Updating linter"). It was unconfigured cookiecutter scaffolding anyway (referenced a placeholdersrc/your_package_name/__about__.py, needed amkdocs.ymlthat never existed).gh-pagesbranch 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'sdeploy-report.yml:mainand PRs touchingdocs/**(plusworkflow_dispatch).docs/index.htmllanding page listing everydocs/*.htmlreport (title pulled from each file's<h1>, newest first,LATESTbadge).docs/directory to the Cloudflare Pages projectcooperbench-reports.The report is self-contained HTML (inline CSS, no runtime data fetches), so no static-site generator is needed.
CooperBench has no Cloudflare secrets yet. The deploy step skips gracefully (green, with a warning) until both are set — same token/account CooperTrain uses:
(Or promote them to org-level secrets so both repos share them.)
Notes / decisions
cooperbench-reports), not CooperTrain'scooperbench-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-nameif you'd rather merge them.docs/dir, sodocs/team_harness_ablation_report.htmllands atcooperbench-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 onmain.🤖 Generated with Claude Code