4
4
#
5
5
version : 2
6
6
jobs :
7
- build :
8
- branches :
9
- only : master
10
-
7
+ lint :
8
+ working_directory : ~/repo
11
9
docker :
12
- # specify the version you desire here
13
10
- image : circleci/node:12
14
-
15
- # Specify service dependencies here if necessary
16
- # CircleCI maintains a library of pre-built images
17
- # documented at https://circleci.com/docs/2.0/circleci-images/
18
- # - image: circleci/mongo:3.4.4
19
-
11
+ steps :
12
+ - checkout
13
+ - restore_cache :
14
+ key : dependencies-cache-{{ checksum "package.json" }}
15
+ - run : yarn install
16
+ - save_cache :
17
+ key : dependencies-cache-{{ checksum "package.json" }}
18
+ paths :
19
+ - node_modules
20
+ - run : yarn lint
21
+ build :
20
22
working_directory : ~/repo
21
-
23
+ docker :
24
+ - image : circleci/node:12
22
25
steps :
23
26
- checkout
24
-
25
- # Download and cache dependencies
26
27
- restore_cache :
27
- keys :
28
- - v1-dependencies-{{ checksum "package.json" }}
29
- # fallback to using the latest cache if no exact match is found
30
- - v1-dependencies-
31
-
28
+ key : dependencies-cache-{{ checksum "package.json" }}
32
29
- run : yarn install
33
-
34
30
- save_cache :
31
+ key : dependencies-cache-{{ checksum "package.json" }}
35
32
paths :
36
33
- node_modules
37
- key : v1-dependencies-{{ checksum "package.json" }}
38
-
39
- # run tests!
40
34
- run : yarn build
41
- # - run: yarn deploy
42
35
- run :
43
36
name : deploy
44
37
command : |
@@ -51,39 +44,18 @@ jobs:
51
44
git add .
52
45
git commit -m "generated docs"
53
46
git push origin HEAD:gh-pages --force
54
- lint :
55
- branches :
56
- ignore :
57
- - master
58
- - gh-pages
59
-
60
- docker :
61
- # specify the version you desire here
62
- - image : circleci/node:12
63
-
64
- # Specify service dependencies here if necessary
65
- # CircleCI maintains a library of pre-built images
66
- # documented at https://circleci.com/docs/2.0/circleci-images/
67
- # - image: circleci/mongo:3.4.4
68
-
69
- working_directory : ~/repo
70
-
71
- steps :
72
- - checkout
73
-
74
- # Download and cache dependencies
75
- - restore_cache :
76
- keys :
77
- - v1-dependencies-{{ checksum "package.json" }}
78
- # fallback to using the latest cache if no exact match is found
79
- - v1-dependencies-
80
-
81
- - run : yarn install
82
47
83
- - save_cache :
84
- paths :
85
- - node_modules
86
- key : v1-dependencies-{{ checksum "package.json" }}
87
-
88
- # run tests!
89
- - run : yarn lint
48
+ workflows :
49
+ version : 2
50
+ lint_and_build :
51
+ jobs :
52
+ - lint :
53
+ filters :
54
+ branches :
55
+ ignore :
56
+ - master
57
+ - gh-pages
58
+ - build :
59
+ filters :
60
+ branches :
61
+ only : master
0 commit comments