Deepak Sahu commited on
Commit
56144ca
·
unverified ·
1 Parent(s): 3abee27

Create hf_sycn.yml

Browse files
Files changed (1) hide show
  1. .github/workflows/hf_sycn.yml +26 -0
.github/workflows/hf_sycn.yml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Reference: https://huggingface.co/docs/hub/spaces-github-actions
2
+ # ENV
3
+ # HF_USERNAME
4
+ # SPACE_NAME
5
+ name: Sync to Hugging Face hub
6
+ on:
7
+ push:
8
+ branches: [main]
9
+
10
+ # to run this workflow manually from the Actions tab
11
+ workflow_dispatch:
12
+
13
+ jobs:
14
+ sync-to-hub:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v3
18
+ with:
19
+ fetch-depth: 0
20
+ lfs: true
21
+ - name: Push to hub
22
+ env:
23
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
24
+ HF_USERNAME: ${{ vars.HF_USERNAME }}
25
+ SPACE_NAME: ${{ vars.SPACE_NAME }}
26
+ run: git push https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME main