Skip to content

fix(ci): allow deploying an arbitrary commit (rollback was broken) - #36

Merged
EOEboh merged 1 commit into
mainfrom
fix/deploy-checkout-sha
Jul 28, 2026
Merged

fix(ci): allow deploying an arbitrary commit (rollback was broken)#36
EOEboh merged 1 commit into
mainfrom
fix/deploy-checkout-sha

Conversation

@EOEboh

@EOEboh EOEboh commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Found by running the rollback drill instead of assuming it worked.

Rolling back is documented as re-running Deploy against the previous commit. That failed: actions/checkout defaults to a shallow fetch and resolves ref as a branch/tag glob, so a raw SHA cannot be fetched.

git fetch --depth=1 origin +refs/heads/026f727*:... +refs/tags/026f727*:...
The process '/usr/bin/git' failed with exit code 1

fetch-depth: 0 fixes it. The recovery path would have failed during an actual incident, which is the worst possible time to discover it.

Production was never touched — the run died at checkout, long before the release step, same as when the image build failed earlier.

Rolling back is documented as re-running the deploy against the previous
commit, and that did not work. actions/checkout defaults to a shallow
fetch and resolves ref as a branch or tag glob, so a raw SHA fails:

  git fetch --depth=1 origin +refs/heads/<sha>*:... +refs/tags/<sha>*:...
  The process '/usr/bin/git' failed with exit code 1

fetch-depth: 0 fetches full history so a commit can be checked out.

Found by actually running the rollback rather than trusting it. The run
failed at checkout, long before the release step, so production was never
touched — the same ordering that protected it when the image build failed.
@cloudflare-workers-and-pages

Copy link
Copy Markdown
Contributor

Deploying hookdrop with  Cloudflare Pages  Cloudflare Pages

Latest commit: c45b4a4
Status: ✅  Deploy successful!
Preview URL: https://fcabc615.hookdrop.pages.dev
Branch Preview URL: https://fix-deploy-checkout-sha.hookdrop.pages.dev

View logs

@cloudflare-workers-and-pages

Copy link
Copy Markdown
Contributor

Deploying hookdrop-frontend with  Cloudflare Pages  Cloudflare Pages

Latest commit: c45b4a4
Status: ✅  Deploy successful!
Preview URL: https://550be1a7.hookdrop-frontend.pages.dev
Branch Preview URL: https://fix-deploy-checkout-sha.hookdrop-frontend.pages.dev

View logs

@EOEboh
EOEboh merged commit bd75740 into main Jul 28, 2026
6 checks passed
@EOEboh
EOEboh deleted the fix/deploy-checkout-sha branch July 28, 2026 12:29
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