edjx22
commited on
Update main.yml
Browse files
.github/workflows/main.yml
CHANGED
|
@@ -10,16 +10,17 @@ jobs:
|
|
| 10 |
steps:
|
| 11 |
- uses: actions/checkout@v3
|
| 12 |
with:
|
| 13 |
-
fetch-depth: 0
|
| 14 |
lfs: true
|
| 15 |
|
| 16 |
-
- name: Pull changes
|
| 17 |
-
run: git pull
|
| 18 |
|
| 19 |
-
- name:
|
| 20 |
-
run: git merge --strategy-option theirs || true # Keeps Hugging Face changes if possible
|
| 21 |
-
|
| 22 |
-
- name: Push merged changes to Hugging Face
|
| 23 |
env:
|
| 24 |
HF_TOKEN: ${{ secrets.token }}
|
| 25 |
-
run: git push https://j565xu:$HF_TOKEN@huggingface.co/spaces/j565xu/test main
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
steps:
|
| 11 |
- uses: actions/checkout@v3
|
| 12 |
with:
|
| 13 |
+
fetch-depth: 0 # Ensures full history is fetched
|
| 14 |
lfs: true
|
| 15 |
|
| 16 |
+
- name: Pull latest changes
|
| 17 |
+
run: git pull origin main # Pull latest changes from remote before pushing
|
| 18 |
|
| 19 |
+
- name: Force push to hub
|
|
|
|
|
|
|
|
|
|
| 20 |
env:
|
| 21 |
HF_TOKEN: ${{ secrets.token }}
|
| 22 |
+
run: git push --force https://j565xu:$HF_TOKEN@huggingface.co/spaces/j565xu/test main
|
| 23 |
+
|
| 24 |
+
- name: Check status after pull
|
| 25 |
+
run: git status
|
| 26 |
+
|