wyldecat commited on
Commit
269223c
·
1 Parent(s): 9c49e08

chore: add push-to-hf workflow

Browse files
Files changed (1) hide show
  1. .github/workflows/push-to-hf.yml +40 -0
.github/workflows/push-to-hf.yml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Push to HF Repo
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ push_to_hf:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ # 1. Checkout the repo
14
+ - name: Checkout repository
15
+ uses: actions/checkout@v4
16
+ with:
17
+ fetch-depth: 0
18
+ - name: Install Git LFS
19
+ run: |
20
+ git lfs install
21
+ git lfs fetch --all
22
+ git lfs pull
23
+ # 2. Set up Git
24
+ - name: Configure Git
25
+ run: |
26
+ git config user.name "MotifTech"
27
+ git config user.email "[email protected]"
28
+
29
+ # 3. Add HF remote
30
+ - name: Add Hugging Face remote
31
+ run: |
32
+ git remote add hf https://huggingface.co/Motif-Technologies/activation
33
+ git fetch hf || true
34
+
35
+ # 4. Push to HF repo
36
+ - name: Push to Hugging Face
37
+ env:
38
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
39
+ run: |
40
+ git push "https://hf_token:${HF_TOKEN}@huggingface.co/Motif-Technologies/activation" HEAD:main