Skip to content

fix(ci): skip unreleased stable branch as deploy target#14886

Merged
skjnldsv merged 1 commit into
masterfrom
fix/sphinxbuild-skip-unreleased-stable
May 19, 2026
Merged

fix(ci): skip unreleased stable branch as deploy target#14886
skjnldsv merged 1 commit into
masterfrom
fix/sphinxbuild-skip-unreleased-stable

Conversation

@skjnldsv
Copy link
Copy Markdown
Member

☑️ Resolves

Fixes stable34 (RC-only) being incorrectly deployed as server/stable/ on gh-pages while v34.0.0 is not yet released.

What changed and why

The stage-and-check job was picking the highest-numbered stable branch purely by git ref (sort -n | tail -1), ignoring whether that branch has an actual release.

Now mirrors the is_version_released() check already present in build/build-index.php: iterates stable branches descending, queries the GitHub API for v{N}.0.0, and uses the first branch that returns HTTP 200. Branches with only RC tags are skipped.

Effect:

Branch Before After
stable34 (RC1 only) deployed as server/stable/ deployed as server/34/
stable33 (released) deployed as server/33/ deployed as server/stable/

🖼️ Screenshots

N/A — CI workflow change only.

✅ Checklist

  • I have built the documentation locally and reviewed the output
  • Screenshots are included for visual changes
  • I have not moved or renamed pages (or added a redirect if I did)
  • I have run codespell or similar and addressed any spelling issues

Mirror the is_version_released() check from build/build-index.php in
the sphinxbuild deploy job. Instead of taking the highest-numbered
stable branch from git refs, iterate descending and check for a
v{N}.0.0 GitHub release tag. First branch with a real release wins.

This prevents a pre-release branch (e.g. stable34 with RC1 only) from
being deployed to server/stable/ on gh-pages.

Signed-off-by: skjnldsv <skjnldsv@proton.me>
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
@github-actions github-actions Bot added github_actions Pull requests that update GitHub Actions code 3. to review labels May 19, 2026
@github-actions
Copy link
Copy Markdown
Contributor

📖 Documentation Preview

🔍 Open preview →

No RST documentation pages changed in this PR.

Last updated: Tue, 19 May 2026 09:33:38 GMT

@skjnldsv skjnldsv enabled auto-merge May 19, 2026 09:37
@skjnldsv skjnldsv self-assigned this May 19, 2026
@skjnldsv skjnldsv merged commit f5f325d into master May 19, 2026
24 checks passed
@skjnldsv skjnldsv deleted the fix/sphinxbuild-skip-unreleased-stable branch May 19, 2026 09:51
@skjnldsv
Copy link
Copy Markdown
Member Author

/backport to stable34

@skjnldsv
Copy link
Copy Markdown
Member Author

/backport to stable33

@skjnldsv
Copy link
Copy Markdown
Member Author

/backport to stable32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review bug github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants