regexper-static/.gitlab-ci.yml
2018-06-05 08:41:15 -04:00

65 lines
946 B
YAML

image: node:latest
cache:
paths:
- node_modules
before_script:
- yarn install
stages:
- test
- build
- deploy
test:
stage: test
coverage: '/^Statements\s*:\s*([^%]+)/'
artifacts:
paths:
- reports/
script:
yarn test
tags:
- shared
build:
stage: build
artifacts:
paths:
- build/
script:
- yarn build
tags:
- shared
deploy_preview:
stage: deploy
environment:
name: preview
url: https://preview.regexper.com
variables:
BANNER: preview
CLOUD_FRONT_ID: $PREVIEW_CLOUDFRONT_ID
DEPLOY_BUCKET: $PREVIEW_DEPLOY_BUCKET
DEPLOY_ENV: preview
GA_PROPERTY: $PREVIEW_GA_PROPERTY
script:
- yarn deploy
only:
- react # TODO: Change to master once merged
tags:
- shared
deploy_production:
stage: deploy
environment:
name: production
url: https://regexper.com
script:
- yarn deploy
only:
- tags
tags:
- shared