Skip to content

Commit 27a3a80

Browse files
vdusekclaude
andcommitted
ci: Fix docs release failing on detached HEAD
The post-publish doc release job invokes manual_release_docs.yaml with a commit SHA, so actions/checkout leaves the repo in detached HEAD and the hand-rolled git push fails. Switch to EndBug/add-and-commit with new_branch set to the default branch, and apply the same fix to manual_version_docs.yaml where the same latent bug existed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 76e4de4 commit 27a3a80

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

.github/workflows/manual_release_docs.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ jobs:
7171
run: uv run poe update-docs-theme
7272

7373
- name: Commit the updated package.json and lockfile
74-
run: |
75-
git config user.name 'GitHub Actions'
76-
git config user.email 'github-actions[bot]@users.noreply.github.com'
77-
git add website/package.json
78-
git add website/yarn.lock
79-
git diff-index --quiet HEAD || git commit -m 'chore: Automatic docs theme update [skip ci]' || true
80-
git push
74+
uses: EndBug/add-and-commit@v10
75+
with:
76+
add: website/package.json website/yarn.lock
77+
message: "chore: Automatic docs theme update [skip ci]"
78+
default_author: github_actions
79+
# Required: checkout may leave a detached HEAD when invoked with a SHA ref.
80+
new_branch: ${{ github.event.repository.default_branch }}
8181

8282
- name: Build docs
8383
run: uv run poe build-docs

.github/workflows/manual_version_docs.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ jobs:
123123
add: website/versioned_docs website/versioned_sidebars website/versions.json
124124
message: "docs: Version docs for v${{ steps.snapshot.outputs.version }} [skip ci]"
125125
default_author: github_actions
126+
# Required: checkout may leave a detached HEAD when invoked with a SHA ref.
127+
new_branch: ${{ github.event.repository.default_branch }}
126128

127129
- name: Resolve output commitish
128130
id: resolve_commitish

0 commit comments

Comments
 (0)