Permalink
Fetching contributors…
Cannot retrieve contributors at this time
53 lines (42 sloc) 1.19 KB
version: 2
jobs:
build:
working_directory: ~/grow
docker:
- image: grow/base:master
steps:
- checkout
- restore_cache:
keys:
- grow-cache-{{ .Branch }}-{{ checksum "package.json" }}
- run:
name: Grow Install
command: grow install
- save_cache:
key: grow-cache-{{ .Branch }}-{{ checksum "package.json" }}
paths:
- node_modules
- run:
name: Grow Build
command: grow build --deployment grow.io
- run:
name: Deploy to Prod
command: if [ "$CIRCLE_BRANCH" == "master" ] && [ "$CIRCLE_PULL_REQUEST" == "" ] ; then grow deploy --noconfirm grow.io ; fi
- restore_cache:
keys:
- gem-cache-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
- run:
name: Install Gems
command: bundle install
- save_cache:
key: gem-cache-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle
- run:
name: Percy Snapshots
command: percy snapshot --widths "412,1280" --enable_javascript build/
workflows:
version: 2
build:
jobs:
- build