Skip to content

Commit

Permalink
devops: lighthouse ci (#65)
Browse files Browse the repository at this point in the history
* devops:  lighthouse reports on prs

* chore: cleanup

* chore: test lighthouse ci

* devops: lighthouse reports on pr

* devops: use zentered/vercel-preview-url
  • Loading branch information
gaboesquivel authored Apr 6, 2024
1 parent 53910a9 commit 864e44f
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- name: Add comment to PR
id: loading_comment_to_pr
uses: marocchino/sticky-pull-request-comment@v1
uses: marocchino/sticky-pull-request-comment@latest
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
number: ${{ github.event.issue.number }}
Expand All @@ -20,9 +20,11 @@ jobs:
Running Lighthouse audit...
- name: Capture Vercel preview URL
id: vercel_preview_url
uses: aaron-binary/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: zentered/[email protected]
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
- name: Get URL
run: echo "https://${{ steps.vercel_preview_url.outputs.preview_url }}"
- uses: actions/checkout@v2
- name: Audit preview URL with Lighthouse
id: lighthouse_audit
Expand All @@ -34,7 +36,7 @@ jobs:
temporaryPublicStorage: true
- name: Format lighthouse score
id: format_lighthouse_score
uses: actions/github-script@v3
uses: actions/github-script@latest
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
Expand Down Expand Up @@ -62,7 +64,7 @@ jobs:
core.setOutput("comment", comment);
- name: Add comment to PR
id: comment_to_pr
uses: marocchino/sticky-pull-request-comment@v1
uses: marocchino/sticky-pull-request-comment@latest
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
number: ${{ github.event.issue.number }}
Expand Down

0 comments on commit 864e44f

Please sign in to comment.