Skip to content

Commit 8b8637f

Browse files
authored
Merge pull request #7 from ohgodwhy2k/ohgodwhy2k/lighthouse
feat: Create lighthouse.yml
2 parents ed90b2a + 45193a9 commit 8b8637f

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

.github/workflows/lighthouse.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# .github/workflows/lighthouse.yml
2+
3+
name: 'Lighthouse CI'
4+
5+
on:
6+
push:
7+
branches: [main, master] # Run on pushes to main/master
8+
pull_request: # Run on pull requests
9+
10+
jobs:
11+
lighthouse:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: 'Checkout Repo'
15+
uses: actions/checkout@v4
16+
17+
# --- If you have a build step, add it here ---
18+
- name: 'Use Node.js'
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: 18 # Specify your node version
22+
23+
- name: 'Install Dependencies'
24+
run: npm install # or 'yarn install'
25+
26+
- name: 'Build Website'
27+
run: npm run build # or your specific build command
28+
# ----------------------------------------------
29+
30+
- name: 'Run Lighthouse CI'
31+
uses: treosh/lighthouse-ci-action@v11
32+
with:
33+
# This action will automatically find your .lighthouserc.json file
34+
# and server-static-site.
35+
uploadArtifacts: true # Save reports as artifacts
36+
temporaryPublicStorage: true # Upload to temp storage for a shareable link

.lighthouserc.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"ci": {
3+
"collect": {
4+
"staticDistDir": "./dist"
5+
},
6+
"upload": {
7+
"target": "temporary-public-storage"
8+
}
9+
}
10+
}

0 commit comments

Comments
 (0)