Skip to content

Commit 39bac29

Browse files
westonruterb1ink0gemini-code-assist[bot]
committed
Add steps to bundle-theme to minify CSS for twentytwentytwo and twentytwentyfive
Co-authored-by: Aditya Dhade <[email protected]> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent a9e839c commit 39bac29

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/test-and-zip-default-themes.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,24 @@ jobs:
227227
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
228228
persist-credentials: false
229229

230+
- name: Set up Node.js for themes needing minification
231+
if: matrix.theme == 'twentytwentytwo' || matrix.theme == 'twentytwentyfive'
232+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
233+
with:
234+
node-version-file: '.nvmrc'
235+
cache: npm
236+
cache-dependency-path: src/wp-content/themes/${{ matrix.theme }}/package-lock.json
237+
238+
- name: Install npm dependencies
239+
if: matrix.theme == 'twentytwentytwo' || matrix.theme == 'twentytwentyfive'
240+
run: npm ci
241+
working-directory: src/wp-content/themes/${{ matrix.theme }}
242+
243+
- name: Build theme assets
244+
if: matrix.theme == 'twentytwentytwo' || matrix.theme == 'twentytwentyfive'
245+
run: npm run build
246+
working-directory: src/wp-content/themes/${{ matrix.theme }}
247+
230248
- name: Upload theme ZIP as an artifact
231249
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
232250
with:

0 commit comments

Comments
 (0)