Spaces:
Sleeping
Sleeping
rjorgec
commited on
Update main.yml
Browse files- .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 |
-
|
|
|
|
| 18 |
env:
|
| 19 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 20 |
-
run:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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
|