Skip to content

fix: use git worktree for gh-pages operations#23

Merged
TaiSakuma merged 2 commits intomainfrom
fix/restore-branch-after-deploy
Mar 22, 2026
Merged

fix: use git worktree for gh-pages operations#23
TaiSakuma merged 2 commits intomainfrom
fix/restore-branch-after-deploy

Conversation

@TaiSakuma
Copy link
Owner

Summary

  • Replace branch switching with git worktree in deploy-to-gh-pages and update-index actions
  • The main checkout is never disturbed, fixing the error where update-index action could not be found after deploying
  • Update "Update latest" step in docs-release.yml to use worktree as well

Test plan

  • Push to main → /dev/ deployed, index.html updated (no action lookup error)
  • Push a tag → /<version>/, /latest/, and index.html all updated

🤖 Generated with Claude Code

TaiSakuma and others added 2 commits March 22, 2026 08:40
The deploy action switched to gh-pages and never switched back,
breaking subsequent steps that reference local actions. Save and
restore the original ref, preserving branch vs detached HEAD state.

Also split the action into separate steps with comments.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace branch switching with git worktree so the main checkout
is never disturbed. This fixes the issue where subsequent steps
could not find local actions after deploying to gh-pages.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions bot added the fix Bug fix label Mar 22, 2026
github-actions bot added a commit that referenced this pull request Mar 22, 2026
@github-actions
Copy link
Contributor

@TaiSakuma TaiSakuma merged commit 157e48e into main Mar 22, 2026
4 checks passed
@TaiSakuma TaiSakuma deleted the fix/restore-branch-after-deploy branch March 22, 2026 12:57
github-actions bot added a commit that referenced this pull request Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant