ci: manual web docs for feature branches

This commit is contained in:
Jovan Krunić
2021-07-29 13:14:42 +02:00
parent 3aed37ecb4
commit 2cf1027796
3 changed files with 699 additions and 0 deletions

View File

@@ -5,6 +5,7 @@ before_script:
stages:
- build
- review
- test
- audit
- deploy
@@ -21,6 +22,37 @@ build:
- lib
expire_in: 1 week
docs_review:
dependencies:
- build
stage: review
script:
- npm run documentation
- ./node_modules/.bin/surge -p ./docs -d https://$CI_PROJECT_PATH_SLUG-$CI_ENVIRONMENT_SLUG.surge.sh/
when: manual
environment:
name: review/$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_NAME
url: https://$CI_PROJECT_PATH_SLUG-$CI_ENVIRONMENT_SLUG.surge.sh/
on_stop: stop_review
except:
- master
- develop
tags:
- secrecy
stop_review:
stage: review
variables:
GIT_STRATEGY: none
script:
- ./node_modules/.bin/surge teardown $CI_PROJECT_PATH_SLUG-$CI_ENVIRONMENT_SLUG.surge.sh
when: manual
environment:
name: review/$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_NAME
action: stop
tags:
- secrecy
audit:
stage: audit
script: