diff --git a/.github/workflows/bundle-analyzer.yml b/.github/workflows/bundle-analyzer.yml new file mode 100644 index 0000000000..03c6f82a13 --- /dev/null +++ b/.github/workflows/bundle-analyzer.yml @@ -0,0 +1,46 @@ +name: Vite Bundle Visualizer + +on: + push: + branches: [ chore/all-my-stuffs ] + +jobs: + analyze: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v6 + - run: | + echo "Before: corepack version => $(corepack --version || echo 'not installed')" + npm install -g corepack@latest + echo "After : corepack version => $(corepack --version)" + corepack enable + pnpm --version + - uses: actions/setup-node@v6 + with: + node-version: 22 + cache: 'pnpm' + + - name: Install dependencies + run: pnpm i --ignore-scripts + + # Ensure vite-bundle-visualizer is installed + # (or remove this step if already in package.json) + - name: Install visualizer + run: pnpm install --save-dev vite-bundle-visualizer + + - name: Build the app + run: pnpm build + + - name: Generate bundle visualizer report + run: | + # Generate stats.html using npx + npx vite-bundle-visualizer dist --template treemap --open false + + + - name: Upload bundle visualizer report + uses: actions/upload-artifact@v4 + with: + name: bundle-visualizer-report + path: dist/stats.html + if-no-files-found: error diff --git a/.github/workflows/sharevb-github-pages-publish.yml b/.github/workflows/sharevb-github-pages-publish.yml index f590275764..54774194da 100644 --- a/.github/workflows/sharevb-github-pages-publish.yml +++ b/.github/workflows/sharevb-github-pages-publish.yml @@ -39,7 +39,7 @@ jobs: with: node-version: 22 - - uses: pnpm/action-setup@v2 + - uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6 name: Install pnpm id: pnpm-install with: