なごみ commited on
Commit
d5fd5e1
·
unverified ·
1 Parent(s): 4936d26

Create sync_to_hf.yml

Browse files
Files changed (1) hide show
  1. .github/workflows/sync_to_hf.yml +23 -0
.github/workflows/sync_to_hf.yml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Sync to Hugging Face Hub
2
+
3
+ on:
4
+ push:
5
+ branches: [main] # mainブランチにpushされたら実行
6
+
7
+ jobs:
8
+ deploy:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - name: Checkout code
12
+ uses: actions/checkout@v4
13
+ with:
14
+ fetch-depth: 0
15
+ lfs: true
16
+
17
+ - name: Push to Hub
18
+ env:
19
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
20
+ run: |
21
+ # リモートにHugging Faceを追加して強制プッシュ
22
+ git remote add hf https://user-name:$HF_TOKEN@huggingface.co/user-name/repo-name
23
+ git push --force hf main