tomrikert commited on
Commit
9ef7806
·
1 Parent(s): 379a66d

Add GitHub Action to auto-sync to Hugging Face Space

Browse files

Automatically pushes to HF Space when commits are pushed to main branch.
Requires HF_TOKEN secret to be configured in GitHub repository settings.

.github/workflows/sync-to-huggingface.yml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Sync to Hugging Face Space
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ workflow_dispatch: # Allow manual trigger
7
+
8
+ jobs:
9
+ sync-to-hub:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - name: Checkout repository
13
+ uses: actions/checkout@v4
14
+ with:
15
+ fetch-depth: 0
16
+ lfs: true
17
+
18
+ - name: Push to Hugging Face
19
+ env:
20
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
21
+ run: |
22
+ git remote add huggingface https://huggingface:$HF_TOKEN@huggingface.co/spaces/tomrikert/clawbody
23
+ git push huggingface main --force