Skip to content

Instantly share code, notes, and snippets.

@kobvel
Last active October 31, 2017 11:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kobvel/f989543763fac8dc1e66bc3ca64eea17 to your computer and use it in GitHub Desktop.
Save kobvel/f989543763fac8dc1e66bc3ca64eea17 to your computer and use it in GitHub Desktop.
.node: &node
image: node:7
before_script:
- npm install
cache:
key: "$CI_COMMIT_REF_NAME"
paths:
- node_modules/
stages:
- deploy
deploy_develop:
stage: deploy
environment:
name: develop
<<: *node
script:
- npm run build -- -e $CI_ENVIRONMENT_SLUG
- npm run deploy
only:
- develop
deploy_production:
stage: deploy
environment:
name: production
<<: *node
script:
- npm run build -- -e $CI_ENVIRONMENT_SLUG
- npm run deploy
only:
- master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment