Skip to content

Commit 1536b9a

Browse files
[n/a] Updating to node 22.12 (#187)
* [n/a] bumping up node version * [n/a] bumping up node version to 22.12 * [n/a] Adding build test workflow
1 parent 95a0506 commit 1536b9a

File tree

5 files changed

+1633
-19
lines changed

5 files changed

+1633
-19
lines changed

.ddev/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ database:
1313
version: "8.0"
1414
use_dns_when_possible: true
1515
composer_version: "2"
16-
nodejs_version: "22"
16+
nodejs_version: "22.12.0"
1717
corepack_enable: false
1818
override_config: true
1919
hooks:

.github/workflows/build.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Build Theme
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
concurrency:
9+
group: build-${{ github.head_ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
build:
14+
name: Build Theme
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Use Node.js 22
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 22.12.0
24+
25+
# Set up composer caching
26+
- name: Cache Composer dependencies
27+
uses: actions/cache@v4
28+
with:
29+
path: /tmp/composer-cache
30+
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
31+
32+
# Build theme
33+
- name: Install Theme Dependencies
34+
uses: "php-actions/composer@v6"
35+
with:
36+
php_version: "8.2"
37+
dev: no
38+
args: "--optimize-autoloader"
39+
working_dir: wp-content/themes/wp-starter
40+
41+
- name: Build Theme
42+
run: |
43+
npm ci
44+
npm run build
45+
working-directory: wp-content/themes/wp-starter
46+
47+
# Install viget-wp composer dependencies
48+
- name: Install viget-wp Dependencies
49+
uses: "php-actions/composer@v6"
50+
with:
51+
php_version: "8.2"
52+
dev: no
53+
args: "--optimize-autoloader"
54+
working_dir: wp-content/mu-plugins/viget-wp
55+
56+
- name: Build Success
57+
run: echo "✅ Theme build completed successfully!"

.github/workflows/deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Use Node.js 22
3131
uses: actions/setup-node@v4
3232
with:
33-
node-version: 22
33+
node-version: 22.12.0
3434

3535
# Set up composer caching
3636
- name: Cache Composer dependencies

0 commit comments

Comments
 (0)