Spaces:
Runtime error
Runtime error
RyZ commited on
Commit ·
3f4cccf
1
Parent(s): 7a83b45
deploy: deploy to HF
Browse files
.github/workflows/main.yml
CHANGED
|
@@ -20,14 +20,14 @@ jobs:
|
|
| 20 |
env:
|
| 21 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 22 |
run: |
|
| 23 |
-
git clone https://huggingface.co/spaces/
|
| 24 |
# Update Git Remote URL and Pull Latest Changes
|
| 25 |
- name: Update Remote and Pull Changes
|
| 26 |
env:
|
| 27 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 28 |
run: |
|
| 29 |
cd space
|
| 30 |
-
git remote set-url origin https://
|
| 31 |
git pull origin main || echo "No changes to pull"
|
| 32 |
# Clean Space Directory - Delete all files except .git
|
| 33 |
- name: Clean Space Directory
|
|
|
|
| 20 |
env:
|
| 21 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 22 |
run: |
|
| 23 |
+
git clone https://huggingface.co/spaces/XRyZ/${{secrets.HF_REPO_NAME}} space
|
| 24 |
# Update Git Remote URL and Pull Latest Changes
|
| 25 |
- name: Update Remote and Pull Changes
|
| 26 |
env:
|
| 27 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 28 |
run: |
|
| 29 |
cd space
|
| 30 |
+
git remote set-url origin https://XRyZ:$HF_TOKEN@huggingface.co/spaces/XRyZ/${{secrets.HF_REPO_NAME}}
|
| 31 |
git pull origin main || echo "No changes to pull"
|
| 32 |
# Clean Space Directory - Delete all files except .git
|
| 33 |
- name: Clean Space Directory
|
.github/workflows/sync-to-hub.yml
CHANGED
|
@@ -16,4 +16,8 @@ jobs:
|
|
| 16 |
env:
|
| 17 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 18 |
run: |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
git push https://XRyZ:$HF_TOKEN@huggingface.co/spaces/XRyZ/whatsapp-backend-test test:main -f
|
|
|
|
| 16 |
env:
|
| 17 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 18 |
run: |
|
| 19 |
+
if [ -z "$HF_TOKEN" ]; then
|
| 20 |
+
echo "Error: HF_TOKEN is not set in GitHub Secrets!"
|
| 21 |
+
exit 1
|
| 22 |
+
fi
|
| 23 |
git push https://XRyZ:$HF_TOKEN@huggingface.co/spaces/XRyZ/whatsapp-backend-test test:main -f
|