Spaces:
Runtime error
Runtime error
Fix HF Spaces deployment workflow
Browse files
.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
|
| 72 |
-
|
| 73 |
-
git remote add spaces https://huggingface.co/spaces/${
|
| 74 |
-
git push
|
|
|
|
| 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
|