Skip to content

Commit

Permalink
Update pagespeed.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
nico-i authored Nov 17, 2023
1 parent 23cf073 commit 540ccf0
Showing 1 changed file with 22 additions and 17 deletions.
39 changes: 22 additions & 17 deletions .github/workflows/pagespeed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,29 @@ jobs:
RESULTS_DIR: ps-reports
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2 # This is a premade github action
with:
- name: Checkout code
uses: actions/checkout@v2
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Use Node.js
uses: actions/setup-node@v3
- name: Create local changes
run: | # Have to be sure a folder is present if not, make it

- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: 14

- name: Run npx command
run: | # Have to be sure a folder is present if not, make it
npx psi-svg $URL_TO_ANALYZE $RESULTS_DIR/desktop.svg --strategy=desktop
npx psi-svg $URL_TO_ANALYZE $RESULTS_DIR/mobile.svg --strategy=mobile
- name: Commit files
run: |
git add .
git config --local user.email "actions@github.com"
git config --local user.name "github-actions[bot]"
git diff --quiet && git diff --staged --quiet || git commit -am "Updated Pagespeed results"
- name: Push changes
uses: ad-m/github-push-action@master # This is a premade github action
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
- name: Commit files
run: |
git add .
git config --local user.email "actions@github.com"
git config --local user.name "github-actions[bot]"
git diff --quiet && git diff --staged --quiet || git commit -am "Updated Pagespeed results"
- name: Push changes
uses: ad-m/github-push-action@master # This is a premade github action
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}

0 comments on commit 540ccf0

Please sign in to comment.