Dan Walsh commited on
Commit
0b5799a
·
1 Parent(s): 9b8eb19

Updating main.yml

Browse files
Files changed (1) hide show
  1. .github/workflows/main.yml +20 -2
.github/workflows/main.yml CHANGED
@@ -16,5 +16,23 @@ jobs:
16
  - name: Push to hub
17
  env:
18
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
19
- run: git push https://dang-w:$HF_TOKEN@huggingface.co/spaces/dang-w/dang-w/ai-content-summariser-api main
20
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  - name: Push to hub
17
  env:
18
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
19
+ run: |
20
+ git config --global user.email "github-actions@github.com"
21
+ git config --global user.name "GitHub Actions"
22
+ echo "Pushing to Hugging Face Space..."
23
+ if git push https://dang-w:$HF_TOKEN@huggingface.co/spaces/dang-w/ai-content-summariser-api main; then
24
+ echo "Successfully pushed to Hugging Face Space"
25
+ else
26
+ echo "Failed to push to Hugging Face Space"
27
+ exit 1
28
+ fi
29
+ - name: Check deployment
30
+ run: |
31
+ echo "Waiting for deployment to complete..."
32
+ sleep 60 # Give some time for the deployment to complete
33
+ if curl -s -o /dev/null -w "%{http_code}" https://huggingface.co/spaces/dang-w/ai-content-summariser-api | grep -q "200\|301\|302"; then
34
+ echo "Deployment successful!"
35
+ else
36
+ echo "Deployment may have failed. Please check manually."
37
+ fi
38
+