Skip to content

Commit

Permalink
create github action for lighthouse ci on push and pr to main
Browse files Browse the repository at this point in the history
  • Loading branch information
hyundonmoon committed Nov 17, 2024
1 parent 87deb8e commit 5f16634
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
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]
- 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 }}
10 changes: 10 additions & 0 deletions .lighthouserc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
ci: {
upload: {
target: "temporary-public-storage",
},
assert: {
preset: "lighthouse:recommended",
},
},
};

0 comments on commit 5f16634

Please sign in to comment.