Skip to content

Commit da95614

Browse files
committed
ci: update GitHub Actions workflow to push build results to the correct branch
1 parent c120de9 commit da95614

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.github/workflows/build-and-commit.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
uses: actions/checkout@v4
2121
with:
2222
fetch-depth: 0 # Fetch all history for proper versioning
23+
ref: ${{ github.ref }}
2324

2425
- name: Setup Node.js
2526
uses: actions/setup-node@v4
@@ -41,4 +42,4 @@ jobs:
4142
- name: Commit build results
4243
run: |
4344
git add build/ -f
44-
git diff --quiet && git diff --staged --quiet || (git commit -m "chore: update build files [skip ci]" && git push)
45+
git diff --quiet && git diff --staged --quiet || (git commit -m "chore: update build files [skip ci]" && git push origin HEAD:${{ github.ref_name }})

0 commit comments

Comments
 (0)