Spaces:
Sleeping
Sleeping
Marek Bukowicki commited on
Commit ·
0268fba
1
Parent(s): 168b369
fix (?) HF sync
Browse files
.github/workflows/sync-to-hf.yml
CHANGED
|
@@ -11,11 +11,16 @@ jobs:
|
|
| 11 |
- uses: actions/checkout@v4
|
| 12 |
with:
|
| 13 |
fetch-depth: 0
|
| 14 |
-
lfs:
|
| 15 |
- name: Push to hub
|
| 16 |
env:
|
| 17 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
|
|
|
| 18 |
run: |
|
| 19 |
git config --global user.name "github-actions[bot]"
|
| 20 |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
- uses: actions/checkout@v4
|
| 12 |
with:
|
| 13 |
fetch-depth: 0
|
| 14 |
+
lfs: true # Enable if you have files >10MB
|
| 15 |
- name: Push to hub
|
| 16 |
env:
|
| 17 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 18 |
+
HF_URL: https://marekb-sci:${{ secrets.HF_TOKEN }}@huggingface.co/spaces/NMR-CeNT-UW/ShimNet-development
|
| 19 |
run: |
|
| 20 |
git config --global user.name "github-actions[bot]"
|
| 21 |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
| 22 |
+
# Add temp remote, fetch to update lease, push, then clean up
|
| 23 |
+
git remote add hf $HF_URL
|
| 24 |
+
git fetch hf main
|
| 25 |
+
git push --force-with-lease hf hfdeploy:main
|
| 26 |
+
git remote remove hf
|