File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 # Allow manual re-builds from the Actions tab.
1212 workflow_dispatch :
1313
14- # Only one docs deployment should run at a time to avoid race conditions on
15- # the gh-pages branch.
14+ # Per-ref grouping so a new push supersedes an in-flight BUILD of the same
15+ # ref (PR iterations, repeated pushes to main). This deliberately does NOT
16+ # serialise deployments: a push to main and its release tag are different
17+ # refs, so they land in different groups. The deploy job carries its own
18+ # ref-independent group for that — see below.
1619concurrency :
17- group : docs-${{ github.ref }}
20+ group : docs-build- ${{ github.ref }}
1821 cancel-in-progress : true
1922
2023permissions :
9194 # Skip deployment for pull requests.
9295 if : github.event_name != 'pull_request'
9396
97+ # Every deploy pushes to the SAME branch (gh-pages), so they must be
98+ # serialised across refs, not per-ref. Releasing tags main and v* almost
99+ # simultaneously, which previously raced: whichever run pushed second was
100+ # rejected with "cannot lock ref 'refs/heads/gh-pages'" and its version
101+ # directory never appeared, while switcher.json still advertised it.
102+ # cancel-in-progress is false because these runs must QUEUE — cancelling
103+ # one would drop a version directory just as surely as the race did.
104+ concurrency :
105+ group : docs-deploy
106+ cancel-in-progress : false
107+
94108 steps :
95109 - name : Checkout repository
96110 uses : actions/checkout@v4
Original file line number Diff line number Diff line change 1+ Fixed the docs deployment racing itself on release. A push to ``main `` and its
2+ release tag are different refs, so the ``docs-${{ github.ref }} `` concurrency
3+ group put them in separate groups and both pushed to ``gh-pages `` at once; the
4+ loser was rejected and its versioned directory never appeared, while
5+ ``switcher.json `` still advertised the version. The deploy job now uses a
6+ ref-independent group so deployments queue instead.
Original file line number Diff line number Diff line change 1+ # This file keeps the upcoming_changes/ directory tracked by git.
2+ # Replace it with real fragment files (e.g. 42.new_feature.rst) as PRs land.
3+
You can’t perform that action at this time.
0 commit comments