-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathconfig.yml
55 lines (46 loc) · 1.19 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
version: 2
jobs:
build:
working_directory: ~/grow
docker:
- image: grow/base:master
steps:
- checkout
- restore_cache:
keys:
- &cache_key grow-cache-{{ .Branch }}-{{ checksum "package.json" }}-{{ checksum "yarn.lock" }}
- run:
name: Grow Install
command: grow install
- save_cache:
key: *cache_key
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 && grow deploy --noconfirm grow.dev; fi
- persist_to_workspace:
root: ~/grow
paths:
- build/*
snapshot:
working_directory: ~/grow
docker:
- image: zoramite/percy-base:latest
steps:
- attach_workspace:
at: ~/grow
- run:
name: Percy Snapshots
command: percy snapshot --widths "412,1280" --enable_javascript build/
workflows:
version: 2
build:
jobs:
- build
- snapshot:
requires:
- build