mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2026-04-17 10:08:43 -04:00
run lighthouse-ci via action [skip ci]
This commit is contained in:
37
.github/workflows/lighthouse.yml
vendored
Normal file
37
.github/workflows/lighthouse.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
name: Lighthouse
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
lhci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12.x
|
||||
# https://github.com/actions/cache/blob/master/examples.md#node---yarn
|
||||
# https://github.com/actions/cache/issues/60
|
||||
- name: Get yarn cache location
|
||||
id: yarn-cache
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ${{ steps.yarn-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
yarn install --no-ignore-optional --frozen-lockfile
|
||||
# - uses: jakepartusch/wait-for-netlify-action@v1
|
||||
# id: wait
|
||||
# with:
|
||||
# site_name: "jakejarvis"
|
||||
- name: Run Lighthouse CI
|
||||
run: |
|
||||
npm install -g @lhci/cli@0.3.x
|
||||
lhci autorun --config=./lighthouserc.json
|
||||
env:
|
||||
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
|
||||
Reference in New Issue
Block a user