4242 paths :
4343 - ~/codesandbox-client
4444
45- build-prod :
45+ build-app :
4646 docker :
4747 - image : circleci/node:9.11.1
4848 working_directory : ~/codesandbox-client
@@ -54,18 +54,48 @@ jobs:
5454 key : v8-prod-app-build-cache-master
5555 - run :
5656 name : Build Application
57- command : yarn build:prod
57+ command : yarn build:app
5858 - save_cache :
5959 key : v8-prod-app-build-cache-{{ .Environment.CIRCLE_BRANCH }}-{{ .Environment.CIRCLE_SHA1 }}
6060 paths :
6161 - ./packages/app/www
62+
63+ build-homepage :
64+ docker :
65+ - image : circleci/node:9.11.1
66+ working_directory : ~/codesandbox-client
67+ steps :
68+ - restore_cache :
69+ key : v8-repo-{{ .Environment.CIRCLE_SHA1 }}
70+ - run :
71+ name : Build Application
72+ command : yarn build:homepage
73+ - save_cache :
74+ key : v8-prod-homepage-build-cache-{{ .Environment.CIRCLE_BRANCH }}-{{ .Environment.CIRCLE_SHA1 }}
75+ paths :
76+ - ./packages/homepage/public
77+
78+ build-combine :
79+ docker :
80+ - image : circleci/node:9.11.1
81+ working_directory : ~/codesandbox-client
82+ steps :
83+ - restore_cache :
84+ key : v8-repo-{{ .Environment.CIRCLE_SHA1 }}
85+
86+ # Restore app build
87+ - restore_cache :
88+ key : v8-prod-app-build-cache-{{ .Environment.CIRCLE_BRANCH }}-{{ .Environment.CIRCLE_SHA1 }}
89+ # Restore homepage build
90+ - restore_cache :
91+ key : v8-prod-homepage-build-cache-{{ .Environment.CIRCLE_BRANCH }}-{{ .Environment.CIRCLE_SHA1 }}
92+ - run :
93+ name : Build Application
94+ command : yarn build:combine
6295 - save_cache :
6396 key : v8-prod-build-cache-{{ .Environment.CIRCLE_BRANCH }}-{{ .Environment.CIRCLE_SHA1 }}
6497 paths :
6598 - ./www
66- - store_artifacts :
67- path : ./www
68- destination : www
6999
70100 test-integrations :
71101 docker :
@@ -150,12 +180,19 @@ workflows:
150180 - lint :
151181 requires :
152182 - build-dependencies
153- - build-prod :
183+ - build-app :
154184 requires :
155185 - build-dependencies
186+ - build-homepage :
187+ requires :
188+ - build-dependencies
189+ - build-combine :
190+ requires :
191+ - build-app
192+ - build-homepage
156193 - create-docker-image :
157194 requires :
158- - build-prod
159195 - lint
160196 - test-integrations
161197 - test-jest
198+ - build-combine
0 commit comments