Yield generated for 299d9cce-b9b3-47cc-8563-712abc5e34d9
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

86 lines
1.7 KiB

executors:
node:
docker:
- image: circleci/node:8
aliases:
restore_cache: &restore_cache
restore_cache:
name: Restore Npm Package Cache
keys:
- yarn-cache-netlify-{{ checksum "yarn.lock" }}
install_node_modules: &install_node_modules
run:
name: Install dependencies
command: yarn
save_cache: &save_cache
save_cache:
name: Save NPM package cache
key: yarn-cache-netlify-{{ checksum "yarn.lock" }}
paths:
- ./node_modules
version: 2.1
jobs:
test:
executor: node
steps:
- checkout
- <<: *restore_cache
- <<: *install_node_modules
- <<: *save_cache
- run:
name: Test
command: yarn test
build:
executor: node
steps:
- checkout
- <<: *restore_cache
- <<: *install_node_modules
- run:
name: Build
command: yarn build
- persist_to_workspace:
root: ./
paths:
- public
deploy:
executor: node
steps:
- checkout
- attach_workspace:
at: ./
- <<: *restore_cache
- <<: *install_node_modules
- run:
name: Install netlify-cli
command: sudo npm install -g --silent netlify-cli
- run:
name: Deploy to Netlify
command: netlify deploy --dir=./public -p
workflows:
version: 2
build_and_deploy:
jobs:
- test:
filters:
branches:
ignore:
- gh-pages
- build:
requires:
- test
- deploy:
requires:
- build
filters:
branches:
only: master