alexdum commited on
Commit
f4f8b53
·
1 Parent(s): bb28547

feat: add step to trigger Hugging Face Space restart after successful deployment

Browse files
Files changed (1) hide show
  1. .github/workflows/main.yml +10 -0
.github/workflows/main.yml CHANGED
@@ -47,3 +47,13 @@ jobs:
47
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
48
  run: |
49
  git push -f https://alexdum:$HF_TOKEN@huggingface.co/spaces/alexdum/jma main
 
 
 
 
 
 
 
 
 
 
 
47
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
48
  run: |
49
  git push -f https://alexdum:$HF_TOKEN@huggingface.co/spaces/alexdum/jma main
50
+
51
+ - name: Restart Hugging Face Space
52
+ env:
53
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
54
+ run: |
55
+ echo "Restarting HF Space alexdum/jma..."
56
+ curl -sS -f -X POST \
57
+ -H "Authorization: Bearer $HF_TOKEN" \
58
+ "https://huggingface.co/api/spaces/alexdum/jma/restart"
59
+ echo "Space restart triggered successfully."