ci: add staging and production environments

Closes #58
This commit is contained in:
Jovan Krunić
2019-05-31 14:12:11 +02:00
parent 235693a9e2
commit cd646a2795

View File

@@ -36,8 +36,7 @@ setup:
build:
stage: build
script:
- npm install
- npm run build
- npm run build:prod
artifacts:
paths:
- www
@@ -84,7 +83,6 @@ pages:
review:
stage: deploy
script:
- npm run build:prod
- ./node_modules/.bin/surge -p ./www -d https://$CI_PROJECT_PATH_SLUG-$CI_ENVIRONMENT_SLUG.surge.sh/
environment:
name: review/$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_NAME
@@ -105,3 +103,27 @@ stop_review:
action: stop
tags:
- secrecy
staging:
stage: deploy
script:
- ./node_modules/.bin/surge -p ./www -d https://$CI_PROJECT_PATH_SLUG-staging.surge.sh/
environment:
name: staging
url: https://$CI_PROJECT_PATH_SLUG-staging.surge.sh/
only:
- develop
tags:
- secrecy
production_demo:
stage: deploy
script:
- ./node_modules/.bin/surge -p ./www -d https://$CI_PROJECT_PATH_SLUG.surge.sh/
environment:
name: production
url: https://$CI_PROJECT_PATH_SLUG.surge.sh/
only:
- master
tags:
- secrecy