rjorgec commited on
Commit
b343aab
·
unverified ·
1 Parent(s): 8ea9533

Update main.yml

Browse files
Files changed (1) hide show
  1. .github/workflows/main.yml +10 -2
.github/workflows/main.yml CHANGED
@@ -14,7 +14,15 @@ jobs:
14
  with:
15
  fetch-depth: 0
16
  lfs: true
17
- - name: Push to hub
 
18
  env:
19
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
20
- run: git push https://rjorgec:$HF_TOKEN@huggingface.co/spaces/DS553-Music-Bot/ChordBot main
 
 
 
 
 
 
 
 
14
  with:
15
  fetch-depth: 0
16
  lfs: true
17
+
18
+ - name: Push to hub (with rebase)
19
  env:
20
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
21
+ run: |
22
+ set -euo pipefail
23
+ HF_URL="https://rjorgec:${HF_TOKEN}@huggingface.co/spaces/DS553-Music-Bot/ChordBot"
24
+ git config user.name "github-actions[bot]"
25
+ git config user.email "github-actions[bot]@users.noreply.github.com"
26
+ git lfs install --local
27
+ git pull --rebase "$HF_URL" main || true
28
+ git push "$HF_URL" main