Repository navigation
ci: split the Pages deploy into a v3 deploy.yml gated by workflow_run - #236
Merged
Merged
Conversation
The v3 CI/CD workflow pair is test-build-release.yml plus a separate deploy.yml triggered by workflow_run. This repo had the Pages build and deploy embedded in the pipeline, so the migration check reported "deploy is only embedded in a single file". - deploy.yml owns the Pages build and deploy. Its workflow_run trigger on "Test Build Release" plus conclusion == 'success' && head_branch == 'main' is the gate, so a red pipeline still cannot publish (BUG-2026-10-25-pages-not-gated stays fixed). The deploy job keeps the retry ladder, the github-pages environment and the post-deploy smoke test. - test-build-release.yml keeps the gates and the release job only. - The docs-change paths filter is dropped: it compared against github.ref, which does not exist in a workflow_run payload, and a filter that silently skips a needed deploy is worse than rebuilding the site each push. - test-ci-pipeline-contract.sh rule 6 now encodes the invariant instead of the layout: a Pages deploy may live in the pipeline (needing every gate) or in deploy.yml (gated through the deploy's needs: chain by a successful run), and an ungated deploy anywhere still fails. The self-test gains three fixtures for the v3 shapes and now treats a checker crash as a failure rather than letting it satisfy an "expect fail" case.
|
🎉 This PR is included in version 2.95.2 🎉 The release is available on: 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.
Summary
Resolves the CI/CD Migration Status failure: the repo was still on the v2 single-file shape, with the Pages build and deploy embedded in
test-build-release.yml.Now it is the v3 pair:
test-build-release.ymldeploy.ymlworkflow_runThe gate is preserved, deliberately
deploy.ymlonly starts when the pipeline concluded successfully on main:This is the property
BUG-2026-10-25-pages-not-gatedwas opened for: a red gate must never publish.workflow_run+conclusion == 'success'enforces it at least as strongly as the oldneeds:edge.Contract test updated to encode the invariant, not the layout
scripts/test-ci-pipeline-contract.shrule 6 previously hard-coded "the deploy must live in the pipeline" and had a self-test asserting "Pages deploy in a separate workflow fails" — it would have rejected this migration. It now states the real rule:deploy.yml, gated through the deploy'sneeds:chain by a successful run on main;Anti-vacuity improved while doing it: three new fixtures cover the v3 shapes, and
expect()now treats a checker crash as a failure — previously a traceback exited non-zero and silently satisfied anexpect ... failcase, which is how a real bug (on: pushbeing a string) stayed hidden during this change.One deliberate behaviour change
The docs-change
paths-filteris dropped. It compared againstgithub.ref, which does not exist in aworkflow_runpayload, and a filter that can silently skip a needed deploy is worse than rebuilding the site on each successful main push.Verify
bash scripts/test-ci-pipeline-contract.sh— OK on the real workflowsbash scripts/test-ci-pipeline-contract.sh --self-test— 15/15 fixtures, no crashesnpm run compliance— exit 0bash scripts/run-verification-gates.sh— 63/63 deterministic, PASSwire-cifreshness probe (workflows: ["Test Build Release"]) matchestimeout-minutes; every action stays SHA-pinned;deploykeeps the retry ladder,github-pagesenvironment and smoke testFiles
.github/workflows/deploy.yml(new).github/workflows/test-build-release.ymlscripts/test-ci-pipeline-contract.sh