Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Commit

Permalink
add: visualizer ci
Browse files Browse the repository at this point in the history
  • Loading branch information
claustra01 committed Aug 9, 2024
1 parent 32d999f commit 949b42c
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .github/workflows/pr-visualizer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: pr-visualizer

on:
pull_request:

permissions:
pull-requests: write

jobs:
visualizer:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
id: build
run: |
npm install
npm run build
- uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist/stats.html
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"eslint": "^8.57.0",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.7",
"rollup-plugin-visualizer": "^5.12.0",
"typescript": "^5.2.2",
"vite": "^5.3.4"
}
Expand Down
3 changes: 2 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { visualizer } from 'rollup-plugin-visualizer';
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react-swc'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
plugins: [react(), visualizer({filename: 'dist/stats.html'}),],
})

0 comments on commit 949b42c

Please sign in to comment.