jebin2 commited on
Commit
0cfd9bf
·
1 Parent(s): 02392c6

Add GitHub Action to sync with Hugging Face Spaces

Browse files
Files changed (1) hide show
  1. .github/workflows/sync-to-hf.yml +21 -0
.github/workflows/sync-to-hf.yml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Sync to Hugging Face hub
2
+
3
+ on:
4
+ push:
5
+ branches: [main] # Trigger on push to main branch
6
+ workflow_dispatch: # Allow manual run
7
+
8
+ jobs:
9
+ sync-to-hub:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v3
13
+ with:
14
+ fetch-depth: 0
15
+ lfs: true # Enable LFS support
16
+ - name: Push to Hugging Face
17
+ env:
18
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
19
+ run: |
20
+ git remote add space https://jebin2:$HF_TOKEN@huggingface.co/spaces/jebin2/comic-panel-extractor || true
21
+ git push --force space main