Spaces:
Runtime error
Runtime error
chrisaka commited on
Commit ·
6df3bf7
1
Parent(s): 6199b68
feat: Add a deploy stage and a job to push the main branch to Hugging Face Spaces.
Browse files- .gitlab-ci.yml +12 -0
.gitlab-ci.yml
CHANGED
|
@@ -8,9 +8,21 @@
|
|
| 8 |
stages:
|
| 9 |
- test
|
| 10 |
- secret-detection
|
|
|
|
| 11 |
variables:
|
| 12 |
SECRET_DETECTION_ENABLED: 'true'
|
| 13 |
secret_detection:
|
| 14 |
stage: secret-detection
|
| 15 |
include:
|
| 16 |
- template: Security/Secret-Detection.gitlab-ci.yml
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
stages:
|
| 9 |
- test
|
| 10 |
- secret-detection
|
| 11 |
+
- deploy
|
| 12 |
variables:
|
| 13 |
SECRET_DETECTION_ENABLED: 'true'
|
| 14 |
secret_detection:
|
| 15 |
stage: secret-detection
|
| 16 |
include:
|
| 17 |
- template: Security/Secret-Detection.gitlab-ci.yml
|
| 18 |
+
|
| 19 |
+
deploy_to_huggingface:
|
| 20 |
+
stage: deploy
|
| 21 |
+
image: alpine:latest
|
| 22 |
+
only:
|
| 23 |
+
- main
|
| 24 |
+
before_script:
|
| 25 |
+
- apk add --no-cache git
|
| 26 |
+
script:
|
| 27 |
+
- git remote add huggingface https://dedalys-civ:${HF_TOKEN}@huggingface.co/spaces/dedalys-civ/dedalys-api || true
|
| 28 |
+
- git push huggingface HEAD:main --force
|