lucabadiali commited on
Commit
f280b9c
·
1 Parent(s): 380dc0d
.github/workflows/huggingface-space-deploy.yml CHANGED
@@ -3,8 +3,8 @@ name: Deploy to Hugging Face Space
3
  on:
4
  push:
5
  branches:
6
- - main # or your default branch
7
- workflow_dispatch: # allow manual runs
8
 
9
  jobs:
10
  deploy:
@@ -17,14 +17,17 @@ jobs:
17
  fetch-depth: 0
18
  lfs: true
19
 
20
- - name: Push to Hugging Face Space
21
  env:
22
- HF_TOKEN: ${{ secrets.HF_HUB_TOKEN }}
23
  run: |
24
- # just for debugging; you can remove once it works
25
- git remote -v
26
 
27
- # push current commit on main to the Space's main branch
 
 
 
28
  git push --force \
29
- https://__token__:${HF_TOKEN}@huggingface.co/spaces/lucabadiali/ML_OPS_Project \
30
  HEAD:main
 
3
  on:
4
  push:
5
  branches:
6
+ - main
7
+ workflow_dispatch:
8
 
9
  jobs:
10
  deploy:
 
17
  fetch-depth: 0
18
  lfs: true
19
 
20
+ - name: Debug Hugging Face token
21
  env:
22
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
23
  run: |
24
+ echo "Token length: ${#HF_TOKEN}"
25
+ git ls-remote https://lucabadiali:${HF_TOKEN}@huggingface.co/spaces/lucabadiali/ML_OPS_Project || echo "ls-remote failed"
26
 
27
+ - name: Push to Hugging Face Space
28
+ env:
29
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
30
+ run: |
31
  git push --force \
32
+ https://lucabadiali:${HF_TOKEN}@huggingface.co/spaces/lucabadiali/ML_OPS_Project \
33
  HEAD:main