/
githubmirror
/
docusaurus
Обзор
Документация
Войти
/
githubmirror
/
docusaurus
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
.github/workflows/lighthouse-report.yml
76 строк
3 KB
dependabot[bot]
chore(deps): bump actions/setup-node from 6.4.0 to 7.0.0 (#12293)
23 июл 2026, 12:28
Не верифицирован
23 июл 2026, 12:28
3f96ebc
Код
Авторство
О чём код?
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@820762786026740c76f36085b0efc47a31fe5020 # v7.0.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@5770ad5eb8f42dd2c4f34da00c94c5381e49af88 # 3.0.5 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} number: ${{ github.event.pull_request.number }} header: lighthouse message: ${{ steps.format_lighthouse_score.outputs.comment }}