Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Lighthouse

on:
# Trigger the workflow on push or pull request,
# but only for the master branch
push:
branches:
- master
pull_request:
branches:
- master

jobs:
lighthouseci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- run: yarn install && npm install -g @lhci/cli@0.6.x
- run: yarn build
- run: lhci autorun
7 changes: 7 additions & 0 deletions lighthouserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"ci": {
"collect": {
"staticDistDir": "./website/build"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of adding a staticDistDir. I believe this should be done

"startServerCommmand" : "yarn start",
"url" : [The URL being output by Webpack]

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know what is the "The URL being output by Webpack" ? I'm not sure about that.
Also yarn start will start the site on the dev server which I don't believe will give the same lighthouse scores as the actual build.

}
}
}