David Saylor commited on
Commit
f17905e
·
unverified ·
1 Parent(s): 8068e29

Create sync-to-hf-space.yml

Browse files
.github/workflows/sync-to-hf-space.yml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Sync to Hugging Face Space
2
+
3
+ on:
4
+ push:
5
+ branches: [ "main" ]
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ sync-to-hub:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - name: Checkout (with LFS)
13
+ uses: actions/checkout@v4
14
+ with:
15
+ fetch-depth: 0
16
+ lfs: true
17
+
18
+ - name: Push to Hugging Face Space
19
+ env:
20
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
21
+ run: |
22
+ git config user.name "github-actions[bot]"
23
+ git config user.email "github-actions[bot]@users.noreply.github.com"
24
+
25
+ # Push Git + LFS pointers to the Space.
26
+ # This uses basic auth in the URL (username + token).
27
+ git push https://dmsaylor:$HF_TOKEN@huggingface.co/spaces/dmsaylor/CHRIS main