break: upgrade to React Router v8 #9389
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: Lighthouse Report | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - docusaurus-v** | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| lighthouse-report: | |
| permissions: | |
| pull-requests: write # for marocchino/sticky-pull-request-comment | |
| name: Lighthouse Report | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 | |
| - name: Use Node.js | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: lts/* | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile || pnpm install --frozen-lockfile || pnpm install --frozen-lockfile | |
| - name: Build website fast | |
| run: pnpm build:website:fast | |
| - name: Audit URLs using Lighthouse | |
| id: lighthouse_audit | |
| uses: treosh/lighthouse-ci-action@3e7e23fb74242897f95c0ba9cabad3d0227b9b18 # 12.6.2 | |
| with: | |
| urls: | | |
| http://localhost:3000 | |
| http://localhost:3000/docs/installation | |
| http://localhost:3000/docs/category/getting-started | |
| http://localhost:3000/blog | |
| http://localhost:3000/blog/preparing-your-site-for-docusaurus-v3 | |
| http://localhost:3000/blog/tags/release | |
| http://localhost:3000/blog/tags | |
| configPath: ./.github/workflows/lighthouserc.json | |
| uploadArtifacts: true | |
| temporaryPublicStorage: true | |
| - name: Format lighthouse score | |
| id: format_lighthouse_score | |
| uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # 9.0.0 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const results = ${{ steps.lighthouse_audit.outputs.manifest }} | |
| const links = ${{ steps.lighthouse_audit.outputs.links }} | |
| const createLighthouseReport = (await import(`${process.env.GITHUB_WORKSPACE}/admin/scripts/formatLighthouseReport.js`)).default; | |
| const comment = createLighthouseReport({ results, links }); | |
| core.setOutput("comment", comment); | |
| - name: Add Lighthouse stats as comment | |
| id: comment_to_pr | |
| uses: marocchino/sticky-pull-request-comment@0ea0beb66eb9baf113663a64ec522f60e49231c0 # 3.0.4 | |
| with: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| number: ${{ github.event.pull_request.number }} | |
| header: lighthouse | |
| message: ${{ steps.format_lighthouse_score.outputs.comment }} |