Skip to content

fix: cancel duplicate sphinx builds on consecutive pushes to the same branch - #14563

Merged
skjnldsv merged 1 commit into
masterfrom
copilot/fix-sphinx-build-concurrency
Apr 24, 2026
Merged

skjnldsv merged 1 commit into
masterfrom
copilot/fix-sphinx-build-concurrency

Conversation

Copilot AI commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Consecutive pushes to master or stable* branches would each spawn independent workflow runs with no cancellation, since github.head_ref is empty on push events and the fallback github.run_id is unique per run — making the concurrency group useless for push.

Change

# Before — push events always get a unique group, never cancelled
group: build-documentation-${{ github.head_ref || github.run_id }}

# After — push events group by ref (e.g. refs/heads/master), cancels stale runs
group: build-documentation-${{ github.head_ref || github.ref }}
  • PRs: behaviour unchanged — github.head_ref is the PR branch name
  • Push: falls back to github.ref, grouping runs by branch and cancelling the in-progress one on the next push

…ate builds

Agent-Logs-Url: https://github.com/nextcloud/documentation/sessions/6153ff5b-1109-4e67-97df-321f765fd51f

Co-authored-by: nextcloud-command <88102737+nextcloud-command@users.noreply.github.com>
@github-actions github-actions Bot added 3. to review github_actions Pull requests that update GitHub Actions code and removed 3. to review labels Apr 24, 2026
@skjnldsv
skjnldsv enabled auto-merge April 24, 2026 07:57
@skjnldsv
skjnldsv merged commit 273d2e7 into master Apr 24, 2026
19 checks passed
@skjnldsv
skjnldsv deleted the copilot/fix-sphinx-build-concurrency branch April 24, 2026 08:00
skjnldsv added a commit that referenced this pull request Jun 15, 2026
Backport of:
- fix/cancel-duplicate-sphinx-builds (#14563): use github.ref for
  push event concurrency group to cancel duplicate builds
- feature/workflow-dispatch-deploy (#15085): allow manual deploy via
  workflow_dispatch trigger
- copilot/add-meta-robots-noindex (#14800): add noindex meta tag to
  non-stable docs, strip it from stable docs on deploy, and write
  robots.txt to allow only stable version to be indexed

Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
skjnldsv added a commit that referenced this pull request Jun 15, 2026
Backport of:
- fix/cancel-duplicate-sphinx-builds (#14563): use github.ref for
  push event concurrency group to cancel duplicate builds
- feature/workflow-dispatch-deploy (#15085): allow manual deploy via
  workflow_dispatch trigger
- copilot/add-meta-robots-noindex (#14800): add noindex meta tag to
  non-stable docs, strip it from stable docs on deploy, and write
  robots.txt to allow only stable version to be indexed

Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants