ci: split deploy jobs into deploy.yml, drop duplicate push-to-main CI#111
Merged
ci: split deploy jobs into deploy.yml, drop duplicate push-to-main CI#111
Conversation
Closes #109 Every merged PR previously ran the full test suite three times — PR, merge_group, and a post-merge push: main rerun of the exact same SHA the queue had just validated. The push rerun wasted ~25 runner-minutes per merge and proved nothing the merge queue hadn't already proven. Move the release (semantic-release) and deploy (Cloudflare Workers) jobs into a new deploy.yml triggered on push: branches: [main]. Drop push: [main, develop] from ci.yml entirely — develop doesn't exist in this repo, and ci.yml now runs only on pull_request and merge_group. The release → deploy chain stays in a single workflow via needs: [release], so the tag semantic-release creates is visible to git describe --tags in the deploy job's VERSION build arg (preserving the fix from #107).
|
🎉 This PR is included in version 1.28.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Closes #109
Summary
push: [main, develop]trigger and therelease+deployjobs from.github/workflows/ci.yml.ci.ymlnow runs only onpull_requestandmerge_group..github/workflows/deploy.yml— triggered onpush: branches: [main], containing therelease(semantic-release) anddeploy(Cloudflare Workers) jobs, connected byneeds: [release].needs: [check]→needs: checkondeploy-previewfor consistency with the rest of the file.Why
Every merged PR was running the full test suite three times: once on the feature branch (
pull_request), once in the merge queue (merge_group), and once on the post-merge main (push: main) — re-validating the exact SHA the queue had just validated. The merge queue's entire guarantee is the SHA we tested is the SHA that lands on main, so the third run proved nothing.Expected savings: ~25 runner-minutes per merged PR (per the measurements in mean-weasel/bleep-that-shit#594, the reference fix cited in the issue).
Correctness notes
git describe:deploychains afterreleasevianeeds: [release]in the same workflow, so semantic-release's newly-pushed tag is visible togit describe --tags --abbrev=0in the deploy build step. This preserves the VERSION-injection fix from fix: pass release tag as VERSION to deploy builds #107.GITHUB_TOKENevent-chain trap:releaseanddeploystay in the same workflow — we don't rely on arelease: publishedevent to kick off deploy, which would never fire (project memory documents thatGITHUB_TOKEN-generated events don't trigger new workflow runs).ReleaseorDeploy to Cloudflarejobs, so merge-queue gating is unaffected.developbranch: doesn't exist in this repo, so dropping[main, develop]is equivalent to droppingmainalone.Test plan
deploy-previewandlive-preview-testsare skipped (they'remerge_group-only).deploy-previewandlive-preview-testsrun;ReleaseandDeploy to Cloudflaredo not appear on this run (moved out of ci.yml).Deployworkflow fires onpush: main,releasejob publishes a new tag (conventional-commit type isci:→ no release),deployjob builds with whatevergit describe --tags --abbrev=0returns and deploys to Cloudflare Workers.Out of scope (intentionally)
Silent-failure review flagged that the new
releasejob has no pre-release test gate (noneeds: [test, e2e]). This is deliberate — re-adding it would re-introduce the exact duplication this PR is eliminating. The merge-queue ruleset is the gate. If defense-in-depth against queue bypass is desired, the right layer is ruleset config (prevent admin bypass), not the workflow.Silent-failure review also flagged that
deployruns even when semantic-release produces no new tag (e.g. purechore:/ci:pushes), causing a redundant redeploy with the previous tag. This is pre-existing behavior from before this PR and can be addressed separately by gatingdeployonneeds.release.outputs.new_release_published.