-
Notifications
You must be signed in to change notification settings - Fork 5
42 lines (33 loc) · 1.15 KB
/
lighthouse.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Run Lighthouse, build, and push
# Run every night at midnight UTC (7PM EST, 8PM EDT).
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
lhci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies with Yarn
run: yarn
- name: Optionally fetch list of cf.gov pages to test
env:
TEST_PAGES_URL: ${{ secrets.TEST_PAGES_URL }}
run: >
[[ -n "${TEST_PAGES_URL}" ]] && wget -O urls.txt "$TEST_PAGES_URL"
continue-on-error: true
- name: Run Lighthouse CLI against specified cf.gov pages
run: yarn lighthouse
- name: Process Lighthouse reports to generate reports.json
run: yarn process-reports
- name: Build the static website
run: yarn build
env:
LIGHTHOUSE_RELATIVE_URL: /cfgov-lighthouse
- name: Commit reports and site back to GitHub
uses: stefanzweifel/git-auto-commit-action@v4
with:
file_pattern: docs
commit_message: Nightly Lighthouse run
commit_author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>