generated from alshedivat/al-folio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
11 additions
and
7 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 |
---|---|---|
|
@@ -12,12 +12,12 @@ name: "Lighthouse Badger" | |
# DEFINE YOUR INPUTS AND TRIGGERS IN THE FOLLOWING | ||
######################################################################## | ||
|
||
# INPUTS as Secrets (env) for not manually triggered workflows | ||
# INPUTS as environmental variables (env) for not manually triggered workflows | ||
env: | ||
URLS: https://alshedivat.github.io/al-folio/ | ||
TOKEN_NAME: ${{ secrets.LIGHTHOUSE_BADGER_TOKEN }} | ||
TOKEN_NAME: GITHUB_TOKEN | ||
# If any of the following env is blank, a default value is used instead | ||
REPO_BRANCH: "${{ github.repository }} master" # target repository & branch e.g. 'dummy/mytargetrepo main' | ||
REPO_BRANCH: "${{ github.repository }} main" # target repository & branch e.g. 'dummy/mytargetrepo main' | ||
MOBILE_LIGHTHOUSE_PARAMS: "--only-categories=performance,accessibility,best-practices,seo --throttling.cpuSlowdownMultiplier=2" | ||
DESKTOP_LIGHTHOUSE_PARAMS: "--only-categories=performance,accessibility,best-practices,seo --preset=desktop --throttling.cpuSlowdownMultiplier=1" | ||
|
||
|
@@ -47,16 +47,20 @@ jobs: | |
echo "BRANCH=$BRANCH" >> $GITHUB_ENV | ||
env: | ||
REPO_BRANCH: ${{ env.REPO_BRANCH }} | ||
- uses: actions/checkout@v4 | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ env.REPOSITORY }} | ||
token: ${{ secrets[github.event.inputs.token_name] || secrets[env.TOKEN_NAME] }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
ref: ${{ env.BRANCH }} | ||
- uses: actions/checkout@v4 | ||
- name: Checkout lighthouse-badges | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: "myactionway/lighthouse-badges" | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
path: temp_lighthouse_badges_nested | ||
- uses: myactionway/[email protected] | ||
- name: Run Lighthouse Badger Action | ||
uses: myactionway/[email protected] | ||
with: | ||
urls: ${{ env.URLS }} | ||
mobile_lighthouse_params: ${{ env.MOBILE_LIGHTHOUSE_PARAMS }} | ||
|