ci(docs): build on pull requests, and serialise gh-pages deploys - #1
Merged
Conversation
The docs workflow ran only on push to main and on workflow_dispatch, so a pull request touching mkdocs.yml, the prose or requirements.txt produced NO check at all -- a dependency bump had no signal, and nothing could say whether it was safe to merge. Split the job in two. build runs on every pull request and on main, with mkdocs build --strict so a broken link or an unknown config key fails rather than warning into the void. deploy keeps the mike publish, gated to push and workflow_dispatch, so a pull request stops after the build and never touches gh-pages. deploy also takes a concurrency group. mike deploy --push writes gh-pages, so two deploys at once cannot both win -- the second is rejected with '! [rejected] gh-pages -> gh-pages (fetch first)', as happened on go-ruby-zlib/docs when several dependency PRs merged seconds apart. cancel-in-progress stays false: killing a publish half way through is worse than making it wait. 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.
The docs workflow ran only on
pushtomainand onworkflow_dispatch, so a pull request touchingmkdocs.yml, the prose orrequirements.txtproduced no check at all. A dependency bump had no signal, and there was no basis on which to merge it — which is why the dependency PRs here have been sitting.buildnow runs on every pull request and onmain, withmkdocs build --strictso a broken link or an unknown config key fails instead of warning into the void.deploykeeps themikepublish, gated topush/workflow_dispatch, so a pull request stops after the build and never touchesgh-pages.deployalso takes a concurrency group.mike deploy --pushwritesgh-pages, so two deploys at once cannot both win — the second is rejected with! [rejected] gh-pages -> gh-pages (fetch first), as happened ongo-ruby-zlib/docswhen several dependency PRs merged seconds apart.cancel-in-progressis false on purpose: killing a publish half way through is worse than making it wait.Piloted and proven on go-ruby-zlib/docs: the gate turned four two-month-old dependency PRs from unverifiable into green, and they merged. The build job mirrors whatever this repo's deploy job already pins — same interpreter, same action versions — so it adds no new bump for Renovate to chase.
🤖 Generated with Claude Code