Skip to content

Commit 28a9b81

Browse files
committed
ci(pages): npm install + verify sonner, drop npm cache, legacy-peer-deps
Made-with: Cursor
1 parent 17f3a1f commit 28a9b81

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

.github/workflows/deploy-pages.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ jobs:
2323
- uses: actions/setup-node@v4
2424
with:
2525
node-version: '20'
26-
cache: npm
27-
cache-dependency-path: website/package-lock.json
26+
# No npm cache: stale caches have led to incomplete node_modules (e.g. missing sonner) on CI
2827

2928
- name: Install and build website
3029
working-directory: website
@@ -33,7 +32,14 @@ jobs:
3332
VITE_BASE: /${{ github.event.repository.name }}/
3433
# Vite + Mermaid/Shiki can exceed default Node heap on ubuntu-latest
3534
NODE_OPTIONS: --max-old-space-size=6144
36-
run: node -v && npm -v && npm ci --userconfig "${GITHUB_WORKSPACE}/website/ci.npmrc" && npm run build
35+
run: |
36+
set -eux
37+
node -v
38+
npm -v
39+
npm install --userconfig "${GITHUB_WORKSPACE}/website/ci.npmrc" --no-audit --no-fund
40+
test -d node_modules/sonner
41+
node --input-type=module -e "import 'sonner'"
42+
npm run build
3743
3844
- uses: actions/upload-pages-artifact@v3
3945
with:

website/ci.npmrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
; Used by GitHub Actions only — avoids parent repo .npmrc (token / pnpm-only keys) breaking npm ci
1+
; GitHub Actions only — ignores parent repo .npmrc (token / pnpm-only keys)
22
registry=https://registry.npmjs.org/
3+
legacy-peer-deps=true

0 commit comments

Comments
 (0)