Skip to content

Commit 9022ba6

Browse files
committed
ci(pages): add Jampack optimization step
- Setup Node.js 22 with npm cache - Cache .jampack directory using actions/cache@v4 - Run npm run optimize to process _site with Jampack Rationale: shrink asset size in CI to improve load performance before Pages upload.
1 parent 26aaffe commit 9022ba6

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/pages-deploy.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,23 @@ jobs:
9494
else
9595
echo "No changes to commit."
9696
fi
97+
98+
- name: Setup Node.js
99+
uses: actions/setup-node@v5
100+
with:
101+
node-version: '22'
102+
cache: 'npm'
103+
104+
- name: Cache Jampack
105+
uses: actions/cache@v4
106+
with:
107+
path: '.jampack'
108+
key: jampack-${{ github.run_id }}
109+
restore-keys: |
110+
jampack
111+
112+
- name: Optimize site
113+
run: npm run optimize
97114

98115
- name: Upload site artifact
99116
uses: actions/upload-pages-artifact@v4

0 commit comments

Comments
 (0)