Skip to content

Commit

Permalink
setting: LightHouse CI 파일 작성
Browse files Browse the repository at this point in the history
  • Loading branch information
hanyugeon committed May 29, 2024
1 parent 59aa92c commit 68ff604
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: lighthouse CI

on:
pull_request:
branches: [push]

jobs:
lhci:
name: Lighthouse CI
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@v2

- name: Use Node.js 18
uses: actions/setup-node@v1
with:
node-version: 18
cache: 'yarn'

- name: Install packages
run: yarn install && yarn global add @lhci/cli

- name: Build
run: yarn 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.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
ci: {
collect: {
staticDistDir: './dist',
url: ['http://localhost:3000'],
numberOfRuns: 5,
},
upload: {
target: 'temporary-public-storage',
githubAppToken: process.env.LHCI_GITHUB_APP_TOKEN,
},
},
};

0 comments on commit 68ff604

Please sign in to comment.