Skip to content

Commit c77833e

Browse files
authored
Add GitHub Actions workflow for Vite bundle analysis
1 parent eaea6e9 commit c77833e

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Vite Bundle Visualizer
2+
3+
on:
4+
push:
5+
branches: [ chore/all-my-stuffs ]
6+
7+
jobs:
8+
analyze:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v6
13+
- run: |
14+
echo "Before: corepack version => $(corepack --version || echo 'not installed')"
15+
npm install -g corepack@latest
16+
echo "After : corepack version => $(corepack --version)"
17+
corepack enable
18+
pnpm --version
19+
- uses: actions/setup-node@v6
20+
with:
21+
node-version: 22
22+
cache: 'pnpm'
23+
24+
- name: Install dependencies
25+
run: pnpm i --ignore-scripts
26+
27+
# Ensure vite-bundle-visualizer is installed
28+
# (or remove this step if already in package.json)
29+
- name: Install visualizer
30+
run: pnpm install --save-dev vite-bundle-visualizer
31+
32+
- name: Build the app
33+
run: pnpm build
34+
35+
- name: Upload bundle visualizer report
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: bundle-visualizer-report
39+
path: dist/stats.html
40+
if-no-files-found: error

0 commit comments

Comments
 (0)