Skip to content

Commit

Permalink
Merge pull request #1 from hyundonmoon/github-actions/lighthouse
Browse files Browse the repository at this point in the history
Lighthouse CI Github Action
  • Loading branch information
hyundonmoon authored Nov 17, 2024
2 parents 87deb8e + 2c1a2d1 commit 6e4cd01
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Lighthouse Action
run-name: Lighthouse Action
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
lhci:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: 9
- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: 22
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Install LightHouse CI
run: pnpm add -g @lhci/cli
- name: Build app
run: pnpm run build
- name: run Lighthouse CI
run: lhci autorun
env:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
13 changes: 13 additions & 0 deletions .lighthouserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"ci": {
"collect": {
"collect": {
"staticDistDir": "./dist",
"numberOfRuns": 3
}
},
"upload": {
"target": "temporary-public-storage"
}
}
}

0 comments on commit 6e4cd01

Please sign in to comment.