wip(action): update pagespeed to wait for update of GH Pages #6
This file contains hidden or 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
| name: PageSpeed Insights Report | |
| on: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| lfs: true | |
| - name: Sleep for 2 minutes to allow GH Pages to update | |
| run: sleep 120s | |
| shell: bash | |
| - name: Create PageSpeed Report | |
| uses: lowlighter/metrics@latest | |
| with: | |
| filename: pagespeed-report.svg | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| base: "" | |
| plugin_pagespeed: yes | |
| # plugin_pagespeed_detailed: yes | |
| plugin_pagespeed_screenshot: yes | |
| plugin_pagespeed_token: ${{ secrets.GOOGLE_API_PAGESPEED_INSIGHTS }} | |
| plugin_pagespeed_url: ${{ vars.SITE_URL }} | |
| # plugin_pagespeed_pwa: yes |