Last active
November 17, 2017 02:32
-
-
Save wingsuitist/96971bfc91ec06a7a4d2bd843e7c8cf9 to your computer and use it in GitHub Desktop.
gitlab-ci stage and prod separated
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: trion/ng-cli-karma | |
cache: | |
paths: | |
- node_modules/ | |
deploy_stage: | |
stage: deploy | |
environment: Stage | |
only: | |
- master | |
script: | |
- rm ./package-lock.json | |
- npm install | |
- ./node_modules/@angular/cli/bin/ng test --progress false --single-run=true --watch=false | |
- ./node_modules/@angular/cli/bin/ng e2e --progress false --watch=false | |
- ./node_modules/@angular/cli/bin/ng build --progress false --prod --base-href plus1-stage.surge.sh | |
- ./node_modules/.bin/surge -p dist/ --domain plus1-stage.surge.sh | |
deploy_production: | |
stage: deploy | |
environment: Production | |
only: | |
- tags | |
script: | |
- rm ./package-lock.json | |
- npm install | |
- ./node_modules/@angular/cli/bin/ng test --progress false --single-run=true --watch=false | |
- ./node_modules/@angular/cli/bin/ng e2e --progress false --watch=false | |
- ./node_modules/@angular/cli/bin/ng build --progress false --prod --base-href plus1.surge.sh | |
- ./node_modules/.bin/surge -p dist/ --domain plus1.surge.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment