Mikiko Bazeley commited on
Commit
df960b0
·
unverified ·
1 Parent(s): 664f2e3

Create sync_hf.yml

Browse files

This syncs the repos

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