regexper-static/.circleci/config.yml
2018-02-10 20:57:52 -05:00

55 lines
1.1 KiB
YAML

version: 2
jobs:
build_deploy:
docker:
- image: circleci/node:7.10
working_directory: ~/repo
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run: yarn install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- run: yarn test
- run: |
echo $GA_PROPERTY
echo $SENTRY_KEY
yarn build
# TODO: Deploy to preview.regexper.com
workflows:
version: 2
preview:
jobs:
- build_deploy:
context: preview-context
filters:
tags:
ignore: /.*/
branches:
only: /.*/
prod:
jobs:
- build_deploy:
context: prod-context
filters:
tags:
only: /.*/
branches:
ignore: /.*/