-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #410 from mazipan/mazipan/fix-netlify-preview-erro…
…r-on-main fix(ci): netlify preview action error on main
- Loading branch information
Showing
2 changed files
with
37 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters