ci(docs): restore the 'run documentation' label gate - #876
Merged
Conversation
PR #875 replaced the label gate with an automatic `paths` trigger, on the premise that the label had never been applied to any of the twelve documentation pull requests and that this was an oversight. It was not: the label is the mechanism. It exists so that documentation builds are started deliberately rather than on every push, and the rewrite was verified locally with the intent of finalising the docs before running builds online. Restore the trigger and the condition byte for byte to their state before #875. The original condition was already carefully built and is worth restating: on a 'labeled' event it reacts only to 'run documentation', so adding several labels in a row does not re-run the job once per label; on opened/synchronize/reopened it checks that the pull request currently carries the label, so a build is opted into once and then repeats on every push. The `paths` filter goes away with the rest. Once a human decides when the job runs, a path filter decides nothing. `docs/src/index.md` keeps the `Draft = false` that #875 added — it is independent of the trigger, and without it the landing page's five example blocks execute nowhere, not even locally. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Why
#875 removed the
run documentationlabel gate and replaced it with an automaticpathstrigger. The premise was that the label had never been applied to any of the twelve
documentation pull requests, and that this was an oversight.
It was not an oversight — the label is the mechanism. It exists so documentation builds are
started deliberately instead of on every push, and the rewrite was verified locally with the
intent of finalising the docs before running builds online. #875 removed a control that was
working as designed.
What changes
.github/workflows/Documentation.ymlgoes back to its pre-#875 state, byte for byte. Thepathsfilter goes away with the rest: once a human decides when the job runs, a path filterdecides nothing.
The restored condition is worth restating, because it is more carefully built than it looks:
labeledevent it reacts only torun documentation— otherwise adding three labelsin a row would start three builds.
opened/synchronize/reopenedit checks that the PR currently carries the label.So a build is opted into once, and then repeats on every push for as long as the label stays.
This also puts the repository back in line with the Handbook's
Documentation.ymltemplate(
VITEPRESS-DOC.md:484-493), which #875 had made OptimalControl the only package to divergefrom.
What is kept
docs/src/index.mdkeeps theDraft = falsethat #875 added. It is independent of the trigger,and without it the landing page's five
@exampleblocks execute nowhere — not in CI, notlocally. That one was a real gap.
Verification
This PR touches only the workflow. For a
pull_requestevent GitHub evaluates the workflow filefrom the PR head, so the restored file governs this PR too: no
Documentationjob should starthere unless the
run documentationlabel is added. That is the check.🤖 Generated with Claude Code