Update huggingface_space_sync.yml
Browse files
.github/workflows/huggingface_space_sync.yml
CHANGED
@@ -2,7 +2,6 @@ name: Sync to Hugging Face Hub
|
|
2 |
on:
|
3 |
push:
|
4 |
branches: [main]
|
5 |
-
# to run this workflow manually from the Actions tab
|
6 |
workflow_dispatch:
|
7 |
|
8 |
jobs:
|
@@ -13,9 +12,17 @@ jobs:
|
|
13 |
with:
|
14 |
fetch-depth: 0
|
15 |
lfs: true
|
16 |
-
|
17 |
-
|
18 |
-
- name:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
env:
|
20 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
21 |
-
run: git push
|
|
|
2 |
on:
|
3 |
push:
|
4 |
branches: [main]
|
|
|
5 |
workflow_dispatch:
|
6 |
|
7 |
jobs:
|
|
|
12 |
with:
|
13 |
fetch-depth: 0
|
14 |
lfs: true
|
15 |
+
|
16 |
+
# Add Hugging Face as a remote
|
17 |
+
- name: Add Hugging Face remote
|
18 |
+
run: git remote add hf https://ailab-bio:$HF_TOKEN@huggingface.co/spaces/ailab-bio/PROTAC-Degradation-Predictor
|
19 |
+
|
20 |
+
# Pull changes from Hugging Face before pushing
|
21 |
+
- name: Pull from Hugging Face
|
22 |
+
run: git pull hf main --allow-unrelated-histories
|
23 |
+
|
24 |
+
# Push changes to Hugging Face after resolving any conflicts
|
25 |
+
- name: Push to Hugging Face
|
26 |
env:
|
27 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
28 |
+
run: git push hf main
|