forked from kawalcovid19/wargabantuwarga.com
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (30 loc) · 989 Bytes
/
lighthouse-ci-prod.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
name: Web Perf Check
on:
push:
branches: [main]
jobs:
lhci:
name: Run Lighthouse CI on Production
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "14"
- name: "Lighthouse CI assertion"
id: lhci
shell: bash
run: |
yarn global add @lhci/[email protected]
echo -e "\n"
echo "Start collecting LH report..."
lhci collect --url=https://www.wargabantuwarga.com/ -n=1
echo -e "\n"
echo "Start asserting LH score..."
lhci assert --config=./lighthouserc.js
echo -e "\n"
echo "Start uploading the report..."
lhci upload --target "temporary-public-storage" --githubAppToken "$LHCI_GITHUB_APP_TOKEN" --githubToken "$GITHUB_TOKEN"
env:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}