Skip to content

ci: fix multiversion docs deployment#267

Merged
yuecideng merged 1 commit into
mainfrom
fix/ci-docs-deploy
May 12, 2026
Merged

ci: fix multiversion docs deployment#267
yuecideng merged 1 commit into
mainfrom
fix/ci-docs-deploy

Conversation

@yuecideng
Copy link
Copy Markdown
Contributor

Description

This PR fixes three bugs that prevented the multiversion docs from deploying correctly to GitHub Pages.

Bug 1 — DOCS_MAX_VERSIONS undefined (tag builds crashed):
The bash prune loop at line 92 referenced ${DOCS_MAX_VERSIONS} but the variable was never set in the build job environment. On every release tag push, bash hit [[ N -gt ]] → syntax error, failing the build step. Fixed by adding DOCS_MAX_VERSIONS: 5 to the build job env and a ${DOCS_MAX_VERSIONS:-5} bash fallback.

Bug 2 — publish job on self-hosted runner (OIDC unavailable):
actions/deploy-pages@v4 requires OIDC token generation to authenticate with the GitHub Pages API. This is only guaranteed on GitHub-hosted runners (ubuntu-latest). The self-hosted Linux runner does not support OIDC, causing the deploy step to fail. Fixed by changing publish.runs-on to ubuntu-latest. The heavy build job still correctly uses the GPU container.

Bug 3 — Main pushes overwriting release docs (already addressed in prior PRs):
The cache-based approach from #263 and #266 is sound — this PR preserves it as-is. Main pushes restore the full cached site, rebuild only main/, and save back. Release docs are never touched by main pushes.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (non-breaking change which improves an existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (existing functionality will not work without user modification)
  • Documentation update

Checklist

  • I have run the black . command to format the code base.
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Dependencies have been updated, if applicable.

🤖 Generated with Claude Code

Three bugs prevented correct docs deployment to GitHub Pages:

1. DOCS_MAX_VERSIONS was referenced in the tag-build prune loop but
   never defined, causing a bash syntax error on every release tag push.
   Added the env var to the build job and a bash fallback.

2. The publish job ran on the self-hosted Linux runner, but
   actions/deploy-pages@v4 requires OIDC token support which is only
   guaranteed on GitHub-hosted runners. Moved publish to ubuntu-latest.

3. Main-branch pushes now correctly preserve all cached version dirs
   and only rebuild the main/ subdirectory.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@yuecideng yuecideng added the bug Something isn't working label May 12, 2026
@yuecideng yuecideng merged commit 2a8b56c into main May 12, 2026
4 of 5 checks passed
@yuecideng yuecideng deleted the fix/ci-docs-deploy branch May 12, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant