ci(update-docs): serialize concurrent runs that publish to MeshInspector.github.io#5989
Merged
ci(update-docs): serialize concurrent runs that publish to MeshInspector.github.io#5989
Conversation
When two CI runs finish near-simultaneously, both call update-docs.yml, both check out MeshInspector.github.io@master, both regenerate docs and commit, then both try to git push. The first push wins; the second hits "[rejected] master -> master (fetch first)" and the workflow fails. Add a job-level concurrency block keyed on a fixed string so GitHub serializes the publish step. cancel-in-progress: false queues runs behind a predecessor so every commit's docs eventually publish (we might later switch to true if we decide we only care about the latest). The block lives in the called workflow (update-docs.yml) so it covers both callers: scheduled / push-to-master via build-test-distribute.yml and manual via update-docs-manual.yml. Observed in run https://github.com/MeshInspector/MeshLib/actions/runs/24936234953
Grantim
approved these changes
Apr 25, 2026
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
Add a job-level
concurrency:block to theupdate-documentationjob in.github/workflows/update-docs.yml. GitHub will now serialize all runs that publish to theMeshInspector.github.iorepo through a shared group, eliminating thegit pushrace that produces:Why
When two CI runs (e.g. two PRs merged within minutes of each other, or a
pushand ascheduleoverlapping) finish near-simultaneously, theupdate-docs.ymljob in each:MeshInspector.github.io@masterat slightly different points in time.git push.The first push wins; the second sees the ref has moved and is rejected, failing the entire
update-dev-documentationjob. Observed today in run 24936234953 (jobupdate-documentation, scheduled run on master).Change
group: meshinspector-github-io-publish— any string; same string = same concurrency group = serialized.cancel-in-progress: false— queue, don't cancel. Every commit's docs eventually publish; the second run waits for the first one'sgit pushto land, then runs against the already-updated remotemasterand pushes its own commit on top. Trade-off vs.cancel-in-progress: true:false(this PR)trueFor a docs-publishing pipeline where each commit's docs are individually meaningful,
falseis the right default. We can flip totruelater if we decide we only ever care about the latest doc snapshot.Coverage
The concurrency block lives in the called workflow (
update-docs.yml), so it protects both callers:build-test-distribute.yml→update-dev-documentationjob → callsupdate-docs.yml(the one that hit the race today)update-docs-manual.yml→ callsupdate-docs.yml(manualworkflow_dispatch)A scheduled run, a push-to-master run, and a manual run all serialize through the same group.
What this does not fix
Concurrency serializes CI-driven publishes only. If a human directly pushes to
MeshInspector.github.io@masterwhile a CI publish is in flight, the CI publish can still race against the human push. If that ever becomes a concern, a follow-up PR can wrap the push step in apull --rebase+ retry loop.🤖 Generated with Claude Code