berangerthomas commited on
Commit
ef06753
·
1 Parent(s): 0c68f52

Add sync HF

Browse files
Files changed (1) hide show
  1. .github/workflows/sync_HF.yaml +23 -0
.github/workflows/sync_HF.yaml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Sync to Hugging Face Space
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+
7
+ jobs:
8
+ sync-to-hub:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v3
12
+ with:
13
+ fetch-depth: 0
14
+
15
+ - name: Push to HF Space
16
+ env:
17
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
18
+ HF_USERNAME: ${{ secrets.HF_USERNAME }}
19
+ HF_SPACE_NAME: ${{ secrets.HF_SPACE_NAME }}
20
+ run: |
21
+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
22
+ git config --global user.name "GitHub Actions"
23
+ git push --force https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$HF_SPACE_NAME main