Marek Bukowicki commited on
Commit
0268fba
·
1 Parent(s): 168b369

fix (?) HF sync

Browse files
Files changed (1) hide show
  1. .github/workflows/sync-to-hf.yml +7 -2
.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: false # Enable if you have files >10MB
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
- git push --force-with-lease https://marekb-sci:${{ secrets.HF_TOKEN }}@huggingface.co/spaces/NMR-CeNT-UW/ShimNet-development hfdeploy:main
 
 
 
 
 
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