UNPKG

854 BYAMLView Raw
1version: 2
2jobs:
3 build:
4 working_directory: /usr/src/app
5 docker:
6 - image: banian/node
7 steps:
8 # Checkout repository
9 - checkout
10
11 # Restore cache
12 - restore_cache:
13 key: yarn-{{ checksum "yarn.lock" }}
14
15 # Install dependencies
16 - run:
17 name: Install Dependencies
18 command: NODE_ENV=dev yarn
19
20 # Keep cache
21 - save_cache:
22 key: yarn-{{ checksum "yarn.lock" }}
23 paths:
24 - "node_modules"
25 # Test
26 - run:
27 name: Tests
28 command: yarn test
29
30 # Build
31 - run:
32 name: Build
33 command: |
34 yarn ks-generate
35
36 # Deploy
37 - deploy:
38 name: Surge
39 command: |
40 if [ "${CIRCLE_BRANCH}" == "master" ]; then
41 yarn surge
42 fi
43
\No newline at end of file