-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.yml
97 lines (87 loc) · 2.2 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
version: 2.1
defaults: &defaults
docker:
- image: cimg/node:16.14
working_directory: /mnt/ramdisk
resource_class: medium+
aliases:
- &save-cache-yarn
key: yarn-{{ checksum "yarn.lock" }}-{{ checksum ".circleci/config.yml" }}
paths:
- .yarn-cache
- &restore-cache-yarn
keys:
- yarn-{{ checksum "yarn.lock" }}-{{ checksum ".circleci/config.yml" }}
- yarn-{{ checksum "yarn.lock" }}
- &save-cache-node
key: node-{{ checksum "yarn.lock" }}-{{ checksum ".circleci/config.yml" }}
paths:
- node_modules
- &restore-cache-node
keys:
- node-{{ checksum "yarn.lock" }}-{{ checksum ".circleci/config.yml" }}
- node-{{ checksum "yarn.lock" }}
- node-
jobs:
install:
<<: *defaults
steps:
- checkout
- restore_cache: *restore-cache-yarn
- restore_cache: *restore-cache-node
- run:
name: Install Dependencies
command: yarn install --frozen-lockfile --cache-folder /mnt/ramdisk/.yarn-cache
- save_cache: *save-cache-yarn
- save_cache: *save-cache-node
release:
<<: *defaults
steps:
- checkout
- restore_cache: *restore-cache-node
- run:
name: Create Release
command: yarn auto shipit
build:
<<: *defaults
steps:
- checkout
- restore_cache: *restore-cache-node
- run:
name: Build Storybook
command: yarn build-storybook
- persist_to_workspace:
root: .
paths:
- storybook
- run:
name: Compress storybook folder
command: tar -czf storybook.tar.gz storybook
- store_artifacts:
path: storybook.tar.gz
chromatic:
<<: *defaults
steps:
- checkout
- restore_cache: *restore-cache-node
- attach_workspace:
at: .
- run:
name: Deploy Storybook
command: yarn chromatic
workflows:
release:
jobs:
- install
- release:
context: UnistartDS
requires:
- install
- build:
context: UnistartDS
requires:
- install
- chromatic:
context: UnistartDS
requires:
- build