Abeshith commited on
Commit
20e6273
·
1 Parent(s): 428f646

Fix HF Spaces deployment workflow

Browse files
Files changed (1) hide show
  1. .github/workflows/docker-build.yml +8 -4
.github/workflows/docker-build.yml CHANGED
@@ -67,8 +67,12 @@ jobs:
67
  uses: actions/checkout@v4
68
 
69
  - name: Push to HuggingFace Spaces
 
 
 
 
70
  run: |
71
- git config --global credential.helper store
72
- echo "https://${{ secrets.HF_USERNAME }}:${{ secrets.HF_TOKEN }}@huggingface.co" > ~/.git-credentials
73
- git remote add spaces https://huggingface.co/spaces/${{ secrets.HF_SPACE_REPO }}.git || true
74
- git push --force spaces main
 
67
  uses: actions/checkout@v4
68
 
69
  - name: Push to HuggingFace Spaces
70
+ env:
71
+ HF_USERNAME: ${{ secrets.HF_USERNAME }}
72
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
73
+ HF_SPACE_REPO: ${{ secrets.HF_SPACE_REPO }}
74
  run: |
75
+ git config --global user.email "action@github.com"
76
+ git config --global user.name "GitHub Action"
77
+ git remote add spaces https://${HF_USERNAME}:${HF_TOKEN}@huggingface.co/spaces/${HF_SPACE_REPO}.git || git remote set-url spaces https://${HF_USERNAME}:${HF_TOKEN}@huggingface.co/spaces/${HF_SPACE_REPO}.git
78
+ git push spaces main --force