serverdaun commited on
Commit
20b88a9
·
1 Parent(s): 1e8ff46

add token sanity check and fix push to hub step

Browse files
.github/workflows/deploy_to_spaces.yml CHANGED
@@ -14,7 +14,17 @@ jobs:
14
  with:
15
  fetch-depth: 0
16
  lfs: true
 
 
 
 
 
 
 
 
 
 
17
  - name: Push to hub
18
  env:
19
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
20
- run: git push https://serverdaun:$HF_TOKEN@huggingface.co/spaces/serverdaun/what_to_wear main
 
14
  with:
15
  fetch-depth: 0
16
  lfs: true
17
+
18
+ - name: Sanity-check token
19
+ env:
20
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
21
+ run: |
22
+ if [ -z "$HF_TOKEN" ]; then
23
+ echo "HF_TOKEN is empty ‼️"; exit 1;
24
+ fi
25
+ echo "Token length: ${#HF_TOKEN}"
26
+
27
  - name: Push to hub
28
  env:
29
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
30
+ run: git push https://serverdaun:$HF_TOKEN@huggingface.co/spaces/serverdaun/what_to_wear.git main