Skip to content

Commit b165a9c

Browse files
Copilotdorkmo
andcommitted
Fix git push detached HEAD error in html-render workflow
Co-authored-by: dorkmo <[email protected]>
1 parent 9e15460 commit b165a9c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/html-render.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ jobs:
2323
steps:
2424
- name: Checkout repository
2525
uses: actions/checkout@v4
26+
with:
27+
ref: ${{ github.head_ref || github.ref_name }}
28+
fetch-depth: 0
2629

2730
- name: Setup Node.js
2831
uses: actions/setup-node@v4
@@ -290,6 +293,6 @@ jobs:
290293
git add TankAlarm-092025-Server-Hologram/WEBSITE_PREVIEW.md TankAlarm-092025-Server-Hologram/screenshots/
291294
git add TankAlarm-112025-Server-BluesOpta/WEBSITE_PREVIEW.md TankAlarm-112025-Server-BluesOpta/screenshots/
292295
git diff --staged --quiet || git commit -m "Update website preview screenshots [skip ci]"
293-
git push
296+
git push origin HEAD:${{ github.head_ref || github.ref_name }}
294297
env:
295298
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)