Skip to content

Commit 6efcf6d

Browse files
committed
[BREAK UPSTREAM] add sage theme circleci config
1 parent 10b750e commit 6efcf6d

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.circleci/config.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ jobs:
107107
name: run PHP build step
108108
command: ./.ci/build/php
109109

110+
- run:
111+
name: install theme composer dependencies
112+
command: cd web/wp-content/themes/sage && composer install
113+
110114
- save_cache:
111115
key: vendor-{{ checksum "composer.lock" }}
112116
paths:
@@ -118,6 +122,41 @@ jobs:
118122
- web
119123
- vendor
120124

125+
build_yarn:
126+
<<: *defaults
127+
docker:
128+
- image: circleci/node:10.16.2
129+
130+
steps:
131+
- checkout
132+
133+
- restore_cache:
134+
keys:
135+
- yarn-packages-{{ checksum "web/wp-content/themes/sage/yarn.lock" }}
136+
- yarn-packages- # used if checksum fails
137+
138+
- run:
139+
name: install theme yarn dependencies
140+
command: cd web/wp-content/themes/sage && yarn install
141+
142+
- run:
143+
name: build theme assets
144+
# If non-hashed versions of site assets are needed for 3rd parties, also run `yarn build:nohash`
145+
command: cd web/wp-content/themes/sage && yarn build
146+
147+
- save_cache:
148+
name: cache Yarn files
149+
key: yarn-packages-{{ checksum "web/wp-content/themes/sage/yarn.lock" }}
150+
paths:
151+
- $HOME/.cache/yarn
152+
153+
- persist_to_workspace:
154+
# Must be relative path from working_directory
155+
root: .
156+
# Must be relative path from root
157+
paths:
158+
- web/wp-content/themes/sage/dist
159+
121160
deploy_to_pantheon:
122161
<<: *defaults
123162
steps:
@@ -231,10 +270,12 @@ workflows:
231270
jobs:
232271
- configure_env_vars
233272
# - static_tests
273+
- build_yarn
234274
- build_php
235275
- deploy_to_pantheon:
236276
requires:
237277
# - static_tests
278+
- build_yarn
238279
- build_php
239280
# - visual_regression_test:
240281
# requires:

0 commit comments

Comments
 (0)