Spaces:
Runtime error
Runtime error
chrisaka commited on
Commit ·
a3f093d
1
Parent(s): 6df3bf7
ci: Add HF_TOKEN validation and update Hugging Face remote authentication to use oauth2.
Browse files- .gitlab-ci.yml +2 -1
.gitlab-ci.yml
CHANGED
|
@@ -24,5 +24,6 @@ deploy_to_huggingface:
|
|
| 24 |
before_script:
|
| 25 |
- apk add --no-cache git
|
| 26 |
script:
|
| 27 |
-
-
|
|
|
|
| 28 |
- git push huggingface HEAD:main --force
|
|
|
|
| 24 |
before_script:
|
| 25 |
- apk add --no-cache git
|
| 26 |
script:
|
| 27 |
+
- if [ -z "$HF_TOKEN" ]; then echo "Error - HF_TOKEN CI/CD variable is missing or empty. Please create an Access Token in Hugging Face."; exit 1; fi
|
| 28 |
+
- git remote add huggingface https://oauth2:${HF_TOKEN}@huggingface.co/spaces/dedalys-civ/dedalys-api || true
|
| 29 |
- git push huggingface HEAD:main --force
|