UNPKG

1.51 kBYAMLView Raw
1version: 2
2
3defaults: &defaults
4 working_directory: ~/storybook-deployer
5 docker:
6 - image: circleci/node:latest-browsers
7
8jobs:
9 install:
10 <<: *defaults
11 steps:
12 - checkout
13 - restore_cache:
14 keys:
15 # Find a cache corresponding to this specific package.json checksum
16 # when this file is changed, this key will fail
17 - storybook-deployer-{{ .Branch }}-{{ checksum "yarn.lock" }}-{{ checksum ".circleci/config.yml" }}
18 - storybook-deployer-{{ .Branch }}-{{ checksum "yarn.lock" }}
19 - storybook-deployer-{{ .Branch }}
20 # Find the most recent cache used from any branch
21 - storybook-deployer-master
22 - storybook-deployer-
23 - run:
24 name: Install Dependencies
25 command: yarn install --frozen-lockfile
26 - save_cache:
27 key: storybook-deployer-{{ .Branch }}-{{ checksum "yarn.lock" }}-{{ checksum ".circleci/config.yml" }}
28 paths:
29 - node_modules
30 - ~/.cache/yarn
31 - persist_to_workspace:
32 root: .
33 paths:
34 - .
35
36 release:
37 <<: *defaults
38 steps:
39 - attach_workspace:
40 at: ~/storybook-deployer
41 - run:
42 name: Release
43 command: yarn release
44
45workflows:
46 version: 2
47 build_and_test:
48 jobs:
49 - install
50
51 - release:
52 requires:
53 - install
54 filters:
55 branches:
56 only:
57 - master
\No newline at end of file