nacho commited on
Commit
091565f
·
1 Parent(s): 01e5f16

ci: 添加 GitHub Actions 自动同步到 HuggingFace Space

Browse files
Files changed (1) hide show
  1. .github/workflows/sync_to_hf.yml +24 -0
.github/workflows/sync_to_hf.yml ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Sync to HuggingFace Space
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
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 HuggingFace Space
19
+ env:
20
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
21
+ run: |
22
+ git config --global user.email "action@github.com"
23
+ git config --global user.name "GitHub Action"
24
+ git push https://huanx:${HF_TOKEN}@huggingface.co/spaces/huanx/ds2api-browser HEAD:main --force