pengqi
commited on
Create sync-to-hf.yml
Browse files
.github/workflows/sync-to-hf.yml
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Sync to Hugging Face
|
2 |
+
|
3 |
+
on:
|
4 |
+
push:
|
5 |
+
branches:
|
6 |
+
- main # 触发分支,按需修改
|
7 |
+
|
8 |
+
jobs:
|
9 |
+
sync:
|
10 |
+
runs-on: ubuntu-latest
|
11 |
+
steps:
|
12 |
+
- name: Checkout code
|
13 |
+
uses: actions/checkout@v4
|
14 |
+
|
15 |
+
- name: Configure Git
|
16 |
+
run: |
|
17 |
+
git config --global user.name "GitHub Actions"
|
18 |
+
git config --global user.email "[email protected]"
|
19 |
+
|
20 |
+
- name: Add HuggingFace Remote
|
21 |
+
run: git remote add hf https://dongsiqie:${{ secrets.HF_TOKEN }}@huggingface.co/dongsiqie/q.git
|
22 |
+
|
23 |
+
- name: Push to HuggingFace
|
24 |
+
run: git push hf main --force
|