Skip to content

Commit 036a023

Browse files
committed
Update deploy-to-hf.yml
1 parent 2e546d2 commit 036a023

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/deploy-to-hf.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ jobs:
4242
git config --global credential.helper store
4343
echo "https://user:${HF_TOKEN}@huggingface.co" > ~/.git-credentials
4444
45+
# Set default branch to main
46+
git config --global init.defaultBranch main
47+
4548
# Initialize git repository
4649
git init
4750
git remote add origin https://huggingface.co/spaces/${{ secrets.HUGGINGFACE_SPACE_REPO }}
@@ -64,8 +67,8 @@ jobs:
6467
git config user.email "actions@github.com"
6568
git commit -m "Update NemaQuant app from GitHub Actions - ${{ github.sha }}"
6669
67-
# Push to Hugging Face Space
68-
git push origin main
70+
# Push to Hugging Face Space (force push to handle initial setup)
71+
git push --force origin main
6972
7073
- name: Summary
7174
run: |

0 commit comments

Comments
 (0)