File tree Expand file tree Collapse file tree 2 files changed +179
-67
lines changed Expand file tree Collapse file tree 2 files changed +179
-67
lines changed Original file line number Diff line number Diff line change
1
+ version : 2.1
2
+ jobs :
3
+ build_changelog :
4
+ docker :
5
+ - image : node:10
6
+ resource_class : " xlarge"
7
+ environment :
8
+ - TERM : dumb
9
+ steps :
10
+ - checkout
11
+ - restore_cache :
12
+ key : changelog-dependency-cache-v3-{{ checksum "yarn.lock" }}
13
+ - run :
14
+ name : ' Install changelog dependencies'
15
+ command : " yarn install --frozen-lockfile"
16
+ - save_cache :
17
+ key : changelog-dependency-cache-v3-{{ checksum "yarn.lock" }}
18
+ paths :
19
+ - node_modules
20
+ - run :
21
+ name : ' Build'
22
+ command : |
23
+ PUBLIC_PATH=/changelog/ yarn build
24
+ - persist_to_workspace :
25
+ root : ./
26
+ paths :
27
+ - node_modules
28
+ - build/
29
+ - firebase.json
30
+ - .firebaserc
31
+ - index.js
32
+ - package.json
33
+ deploy :
34
+ docker :
35
+ - image : node:10
36
+ environment :
37
+ - TERM : dumb
38
+ steps :
39
+ - attach_workspace :
40
+ at : ./
41
+ - run :
42
+ name : ' Deploy to Firebase'
43
+ command : |
44
+ yarn firebase-deploy-directory --project onegraph-dashboard --subpath changelog --directory build/public/ --commit --token "$FIREBASE_TOKEN"
45
+ yarn firebase deploy --debug -P prod --only functions --token "$FIREBASE_TOKEN"
46
+
47
+ staging_deploy :
48
+ docker :
49
+ - image : node:10
50
+ environment :
51
+ - TERM : dumb
52
+ steps :
53
+ - attach_workspace :
54
+ at : ./
55
+ - run :
56
+ name : ' Deploy to Firebase'
57
+ command : |
58
+ yarn firebase-deploy-directory --project oph-dashboard-staging --subpath changelog --directory build/public/ --commit --token "$FIREBASE_TOKEN"
59
+ yarn firebase deploy --debug -P staging --only functions --token "$FIREBASE_TOKEN"
60
+
61
+ workflows :
62
+ version : 2.1
63
+ build-deploy :
64
+ jobs :
65
+ - build_changelog
66
+ - deploy :
67
+ requires :
68
+ - build_changelog
69
+ filters :
70
+ branches :
71
+ only : master
72
+ - staging_deploy :
73
+ requires :
74
+ - build_changelog
75
+ filters :
76
+ branches :
77
+ ignore : master
You can’t perform that action at this time.
0 commit comments