-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (34 loc) · 1.31 KB
/
run-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
name: Run LighthouseCI
on:
issue_comment:
types: [created]
jobs:
lighthouse:
if: |
github.event.issue.pull_request
&& contains(github.event.comment.body, 'run lighthouse')
&& (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'CONTRIBUTOR')
&& contains(github.event.issue.labels.*.name, 'Preview Environment')
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: .tool-versions
- name: 📦 Install Dependencies
run: yarn install --immutable --immutable-cache
- name: 🚨 Run Lighthouse
run: yarn lighthouse
env:
secrets: '{"JWT_SECRET":"JWT_SECRET","OKTA_CLIENT_SECRET":"OKTA_CLIENT_SECRET"}'
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
MPDX_USERNAME: ${{ secrets.MPDX_USERNAME }}
MPDX_PASSWORD: ${{ secrets.MPDX_PASSWORD }}
PREVIEW_URL: 'https://${{ github.head_ref }}.${{ secrets.AMPLIFY_APP_ID }}.amplifyapp.com'
- name: Make a PR Comment
uses: thollander/actions-comment-pull-request@v2
with:
filePath: lighthouse/lighthouse-results.md
comment_tag: lighthouse