13
13
# Download and cache dependencies
14
14
- restore_cache :
15
15
keys :
16
- - v1-dependencies-{{ checksum "package-lock.json" }}
17
- # fallback to using the latest cache if no exact match is found
18
- - v1-dependencies-
16
+ - v1-dependencies-{{ checksum "package-lock.json" }}
17
+ # fallback to using the latest cache if no exact match is found
18
+ - v1-dependencies-
19
19
- run : npm install
20
20
- save_cache :
21
21
paths :
@@ -32,12 +32,12 @@ jobs:
32
32
working_directory : ~/repo
33
33
steps :
34
34
- checkout
35
- # Download and cache dependencies
35
+ # Download and cache dependencies
36
36
- restore_cache :
37
37
keys :
38
- - v1-dependencies-{{ checksum "package-lock.json" }}
39
- # fallback to using the latest cache if no exact match is found
40
- - v1-dependencies-
38
+ - v1-dependencies-{{ checksum "package-lock.json" }}
39
+ # fallback to using the latest cache if no exact match is found
40
+ - v1-dependencies-
41
41
- run : npm install
42
42
- run :
43
43
name : Build
49
49
- node_modules
50
50
- package.json
51
51
52
+ deploy-docs :
53
+ docker :
54
+ - image : circleci/node:9
55
+ working_directory : ~/repo
56
+ steps :
57
+ - checkout
58
+ - restore_cache :
59
+ keys :
60
+ - v1-source-{{ checksum "package-lock.json" }}
61
+ # fallback to using the latest cache if no exact match is found
62
+ - v1-source-
63
+ - run :
64
+ name : Build Docs
65
+ command : npm run docs
66
+ - run :
67
+ name : Deploy Docs to Zeit
68
+ command : npm run docs
69
+ - run :
70
+ name : Aliasing Deployment
71
+ command : npm run alias
72
+
52
73
publish-job :
53
74
docker :
54
75
- image : circleci/node:9
57
78
- checkout
58
79
- restore_cache :
59
80
keys :
60
- - v1-source-{{ checksum "package-lock.json" }}
61
- # fallback to using the latest cache if no exact match is found
62
- - v1-source-
81
+ - v1-source-{{ checksum "package-lock.json" }}
82
+ # fallback to using the latest cache if no exact match is found
83
+ - v1-source-
63
84
- run :
64
85
name : Publish Package
65
86
command : cd dist && npm run semantic-release
@@ -69,13 +90,23 @@ workflows:
69
90
test :
70
91
jobs :
71
92
- test-job
72
- - build-job :
93
+ - build-job
94
+ # filters:
95
+ # branches:
96
+ # only:
97
+ # - master
98
+ - deploy-docs :
99
+ requires :
100
+ - test-job
101
+ - build-job
102
+ # filters:
103
+ # branches:
104
+ # only:
105
+ # - master
106
+ - publish-job :
107
+ requires :
108
+ - deploy-docs
73
109
filters :
74
110
branches :
75
111
only :
76
112
- master
77
- - publish-job :
78
- requires :
79
- - test-job
80
- - build-job
81
-
0 commit comments