|
14 | 14 | - 'src/wp-content/themes/twentynineteen/**' |
15 | 15 | - 'src/wp-content/themes/twentytwenty/**' |
16 | 16 | - 'src/wp-content/themes/twentytwentyone/**' |
| 17 | + - 'src/wp-content/themes/twentytwentytwo/**' |
| 18 | + - 'src/wp-content/themes/twentytwentyfive/**' |
17 | 19 | # Changes to this workflow file should always verify success. |
18 | 20 | - '.github/workflows/test-and-zip-default-themes.yml' |
19 | 21 | pull_request: |
|
29 | 31 | - 'src/wp-content/themes/twentynineteen/**' |
30 | 32 | - 'src/wp-content/themes/twentytwenty/**' |
31 | 33 | - 'src/wp-content/themes/twentytwentyone/**' |
| 34 | + - 'src/wp-content/themes/twentytwentytwo/**' |
| 35 | + - 'src/wp-content/themes/twentytwentyfive/**' |
32 | 36 | # Changes to this workflow file should always verify success. |
33 | 37 | - '.github/workflows/test-and-zip-default-themes.yml' |
34 | 38 | workflow_dispatch: |
@@ -120,6 +124,8 @@ jobs: |
120 | 124 | fail-fast: false |
121 | 125 | matrix: |
122 | 126 | theme: [ |
| 127 | + 'twentytwentyfive', |
| 128 | + 'twentytwentytwo', |
123 | 129 | 'twentytwentyone', |
124 | 130 | 'twentytwenty', |
125 | 131 | 'twentynineteen', |
@@ -221,11 +227,31 @@ jobs: |
221 | 227 | show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} |
222 | 228 | persist-credentials: false |
223 | 229 |
|
| 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 | + |
224 | 248 | - name: Upload theme ZIP as an artifact |
225 | 249 | uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 |
226 | 250 | with: |
227 | 251 | name: ${{ matrix.theme }} |
228 | | - path: src/wp-content/themes/${{ matrix.theme }} |
| 252 | + path: | |
| 253 | + src/wp-content/themes/${{ matrix.theme }} |
| 254 | + !src/wp-content/themes/${{ matrix.theme }}/node_modules |
229 | 255 | if-no-files-found: error |
230 | 256 | include-hidden-files: true |
231 | 257 |
|
|
0 commit comments