added HF spaces restart on release
This commit is contained in:
parent
052e5a18e2
commit
87f5aa112d
|
|
@ -131,3 +131,12 @@ jobs:
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Restart Hugging Face Space
|
||||||
|
if: success()
|
||||||
|
run: |
|
||||||
|
echo "Triggering HF Space restart to pull latest image..."
|
||||||
|
curl -X POST \
|
||||||
|
"https://huggingface.co/api/spaces/${{ vars.HF_SPACE_ID }}/restart" \
|
||||||
|
-H "Authorization: Bearer ${{ secrets.HF_TOKEN }}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
--fail-with-body || echo "HF Space restart failed (Space may not exist or token invalid)"
|
||||||
Loading…
Reference in New Issue