Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
ci(lighthouse): added LightHouse CI
Browse files Browse the repository at this point in the history
  • Loading branch information
victor-pogor committed Jan 30, 2021
1 parent ae200af commit cb9ac34
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/lighthouse-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Lighthouse CI
on: [push]
jobs:
build:
name: Collect LightHouse metrics
runs-on: ubuntu-20.04
defaults:
run:
working-directory: CodeIT
steps:
- name: Set up Git repository
uses: actions/checkout@v2
with:
path: "CodeIT"
fetch-depth: 0
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "latest"
extended: true
- name: Build static pages
run: hugo --source=exampleSite -v --gc
- name: Use Node.js 15.x
uses: actions/setup-node@v2
with:
node-version: 15.x
- name: Run the Lighthouse CI
run: |
npm install -g @lhci/[email protected]
lhci autorun
env:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
25 changes: 25 additions & 0 deletions lighthouserc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module.exports = {
ci: {
collect: {
staticDistDir: "./exampleSite/public",
url: [
"/",
"theme-documentation-basics/",
"theme-documentation-content/",
"theme-documentation-built-in-shortcodes/",
"theme-documentation-extended-shortcodes/",
"basic-markdown-syntax/",
"emoji-support/",
"about/",
],
},
upload: {
target: "lhci",
serverBaseUrl: "https://hugo-codeit-lighthouse-server.herokuapp.com",
token: "02c88e64-cb81-4b0f-829a-affa3445cbb1",
},
assert: {
preset: "lighthouse:recommended",
},
},
};

0 comments on commit cb9ac34

Please sign in to comment.