regexper-static/.circleci/config.yml

67 lines
1.3 KiB
YAML
Raw Normal View History

2018-02-11 01:25:00 +00:00
version: 2
jobs:
2018-02-11 01:57:13 +00:00
build_deploy:
2018-02-11 01:25:00 +00:00
docker:
2018-02-11 02:01:58 +00:00
- image: circleci/node:latest
2018-02-11 01:25:00 +00:00
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" }}
2018-02-11 14:22:37 +00:00
- run:
name: Run tests
command: yarn test
2018-02-11 18:12:23 +00:00
- store_artifacts:
path: reports
- store_test_results:
2018-05-29 21:36:29 +00:00
path: reports/test-results
2018-02-11 18:12:23 +00:00
2018-02-11 14:22:37 +00:00
- run:
name: Build site
command: yarn build
2018-02-11 18:12:23 +00:00
- store_artifacts:
path: build
2018-02-11 14:22:37 +00:00
- run:
name: Deploy to S3
2018-05-27 17:45:26 +00:00
command: yarn deploy
workflows:
version: 2
2018-02-11 01:57:13 +00:00
preview:
jobs:
2018-02-11 01:57:52 +00:00
- build_deploy:
context: regexper-preview
filters:
tags:
ignore: /.*/
2018-02-11 01:57:13 +00:00
branches:
only: /.*/
prod:
jobs:
2018-02-11 01:57:52 +00:00
- build_deploy:
context: regexper-prod
filters:
tags:
only: /.*/
2018-02-11 01:57:13 +00:00
branches:
ignore: /.*/