ci(docs): add a manual Cloudflare rollback workflow - #267
Merged
Conversation
A bad docs deploy cannot be recovered with git. An upload that Cloudflare rejects never becomes a version, so the previously-accepted version keeps serving; and once a bad version IS accepted, reverting the commit only rebuilds a bundle that gets rejected again, leaving the bad version live. Recovery is therefore Cloudflare-side, and until now there was no path to it that did not require a human to hold the account credentials. Manual dispatch only. With no version_id it LISTS versions and changes nothing, so the target is chosen from a real reading rather than guessed; it rolls back only when given an explicit id, which is validated as a UUID before use. Deliberately mirrors deploy-docs.yml's environment block so it draws the same cloudflare-docs credentials — and so that a required-reviewer rule added to that environment (objectos#266) gates this too. Refs #261, #266 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GkauAsZBEemRbco2rEX9Lx
os-project-manager
marked this pull request as ready for review
September 4, 2026 12:55
This was referenced Sep 4, 2026
Merged
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.
Refs #261, #266
Incident recovery tooling, added on the maintainer's direct instruction (2026-09-04, verbatim: 「你先回滚试试」) while the production docs site is down.
Why git cannot fix a bad docs deploy
Cloudflare rejects an oversized upload at version creation. Two consequences, and the second is the one that traps you:
So recovery has to happen Cloudflare-side against a version id, and until now there was no path to that which did not require a human holding the account credentials.
What this adds
A
workflow_dispatch-only workflow. It does not run on push and touches no deploy-trigger path, so merging it does not deploy anything.version_idempty — lists versions and current deployment status, changes nothing. The rollback target comes from a reading rather than a guess.version_id— validates it is a UUID before it reaches a command line, rolls back, then prints what is serving afterwards.It mirrors
deploy-docs.yml'senvironment: cloudflare-docsblock deliberately: it draws the same credentials, and a required-reviewer rule added to that environment (#266) will gate this workflow too.Deviations, stated
mainpublishes the production docs site with no human gate — thecloudflare-docsenvironment has no required reviewer #266. That freeze is about not publishing while no human gate exists on the deploy. This merge fires no deploy and its purpose is to restore service..github/**is not a governed surface in this repo, so no governed-merge rule applies.🤖 Generated with Claude Code
https://claude.ai/code/session_01GkauAsZBEemRbco2rEX9Lx
Generated by Claude Code