Skip to content

Commit

Permalink
refactor: lighthouse.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
bmukesh23 committed Dec 18, 2024
1 parent 709e12a commit 2ba753b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,43 @@ name: Lighthouse CI
on:
push:
branches:
- master
- master # or the branch you're working with
pull_request:
branches:
- master
- master # or the branch you're working with

jobs:
lighthouse:
runs-on: ubuntu-latest

steps:
# Checkout the repository
- name: Checkout repository
uses: actions/checkout@v3

# Set up Node.js environment
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'

# Install dependencies
- name: Install dependencies
run: npm install

# Create the lhci-report folder to store the Lighthouse report
- name: Create lhci-report folder
run: mkdir -p lhci-report

# Run Lighthouse CI to generate the report
- name: Run Lighthouse CI
run: npx lhci autorun

# Update README with Lighthouse scores
- name: Update README with Lighthouse scores
run: node update-readme.js

# Commit and push the updated README
- name: Commit updated README
run: |
git config --global user.name "github-actions[bot]"
Expand Down
Empty file removed lhci-report/latest-report.json
Empty file.

0 comments on commit 2ba753b

Please sign in to comment.