edjx22 commited on
Commit
93f19e8
·
unverified ·
1 Parent(s): f219134

Update main.yml

Browse files
Files changed (1) hide show
  1. .github/workflows/main.yml +9 -8
.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 from Hugging Face
17
- run: git pull https://huggingface.co/spaces/j565xu/test main
18
 
19
- - name: Resolve conflicts automatically (if safe)
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
+