Skip to content

ci: publish the documentation site to the Cloudflare project that owns it - #82

Merged
vishr merged 4 commits into
mainfrom
ci/deploy-the-site
Aug 20, 2026
Merged

ci: publish the documentation site to the Cloudflare project that owns it#82
vishr merged 4 commits into
mainfrom
ci/deploy-the-site

Conversation

@vishr

@vishr vishr commented Aug 20, 2026

Copy link
Copy Markdown
Member

onebox.run is a Cloudflare Pages project — onebox, custom domain already attached — published by hand: wrangler pages project list reports Git Provider: No. That is why it had drifted.

What the live site was serving

before
/reference/fields/services protection, minimum_generations, recovery_window — keys the binary now rejects
/reference/errors 17 error codes deleted this week
/status/capabilities "no drill is run, and no service can currently prove a backup would restore"
/guides/back-up-a-database 404

A published page describing a schema the binary refuses is worse than no page.

This PR

Publication becomes something the repository does. On any change to site/** or docs/**, and on demand, the same build the gate runs — astro check, the build, check-tables.mjs — is deployed to the onebox project with wrangler pages deploy.

Cloudflare, not GitHub Pages: the domain, its certificate and its CDN are already there. Publishing into the path already in use needs one API token; moving to Pages would need a live DNS cutover and buy nothing.

Refuses to publish a build that modified any committed page — the guard that would have caught this drift.

Also corrects the errors-page summary, which still explained a "reserved" column that no longer exists.

Needs two repository secrets

  • CLOUDFLARE_API_TOKEN — Pages:Edit
  • CLOUDFLARE_ACCOUNT_ID

Already published

I deployed the current main build by hand from an authenticated session, so onebox.run is correct now rather than after this merges. This PR is what stops it drifting again.

🤖 Generated with Claude Code

vishr and others added 3 commits August 20, 2026 11:42
The site had no publication in this repository. Its pages are generated
from the binary, committed, and gate-checked on every pull request — and
then never left git. Measured against the live site today: the reference
still describes `protection`, `minimum_generations` and `recovery_window`,
keys that no longer exist; it lists seventeen error codes deleted this
week; the capability page still says "no drill is run, and no service can
currently prove a backup would restore"; and /guides/back-up-a-database is
a 404. Documentation that is verified and unpublished is documentation
nobody reads, and a published page describing a schema the binary rejects
is worse than no page.

Deploys to GitHub Pages from main on any change to the site or the
generated reference, and on demand. main rather than a release tag: the
reference is regenerated from the binary at HEAD and committed beside it,
so main is where the documentation and the code it describes agree.

The job runs the same build the gate runs — `astro check`, the build, and
check-tables.mjs — and then refuses to publish if that build modified any
committed page, because a site whose reference does not match the
committed one is a repository state that should not reach main, let alone
onebox.run.

site/public/CNAME carries the custom domain into the artifact. Pointing
the domain at Pages is a DNS change nobody can make from a workflow; until
that happens this publishes to the github.io address and changes nothing
for visitors.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…s it

onebox.run is a Cloudflare Pages project — `onebox`, with the custom domain
already attached — published by hand: it lists no git provider, and the
pages had drifted a long way behind the binary. The live reference named
`protection`, `minimum_generations` and `recovery_window`, keys the binary
now rejects. It listed seventeen error codes deleted this week. The
capability page said no service could prove a backup would restore, after
drills became executable. The backup guide was a 404.

Publication is now something the repository does. On any change to the
site or the generated reference, and on demand, the same build the gate
runs — `astro check`, the build, and check-tables.mjs — is published to
that project with `wrangler pages deploy`.

Cloudflare rather than GitHub Pages because the domain, its certificate
and its CDN are already there. Publishing into the path already in use
needs one API token; moving to Pages would need a live DNS cutover and buy
nothing.

Before publishing it refuses a build that modified any committed page: a
site whose reference does not match the committed one is a repository
state that should not reach main, let alone onebox.run. That guard is what
would have caught this drift.

Needs CLOUDFLARE_API_TOKEN (Pages:Edit) and CLOUDFLARE_ACCOUNT_ID as
repository secrets.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The page summary still told readers that "a row marked reserved is one no
path raises yet", describing a column that went with the nineteen
unreachable codes. It now says what the table means: every code in it is
raised by a path in the shipped binary.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@vishr vishr changed the title ci: publish the documentation site ci: publish the documentation site to the Cloudflare project that owns it Aug 20, 2026
An account id is an identifier, not a credential — it is what sits in a
committed wrangler.toml on every project that has one. Carrying it as a
repository secret bought no secrecy and doubled what somebody has to set up
before the site can publish itself.

CLOUDFLARE_API_TOKEN, scoped to Pages:Edit, is now the only thing this
workflow needs that is not in the repository.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@vishr
vishr merged commit e11d1f2 into main Aug 20, 2026
5 checks passed
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