# Scans every docs guide on production for accessibility violations, daily. # The page list is the guides in apps/docs/content/guides on master that also appear in # https://supabase.com/docs/sitemap.xml, so a guide merged after the last production deploy waits # for the next scan and shows as a warning on the run page. docs-master-alert.yml posts to Slack # when its list of failures changes. name: Docs Accessibility Scan on: workflow_dispatch: schedule: - cron: '17 5 * * *' concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true permissions: contents: read env: CI: true jobs: a11y: name: Docs accessibility scan timeout-minutes: 45 runs-on: blacksmith-4vcpu-ubuntu-2404 steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false sparse-checkout: | e2e/docs e2e/shared patches apps/docs/content/guides apps/docs/scripts/federated-content/sources apps/docs/lib/redirects - uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 name: Install pnpm with: run_install: false - name: Use Node.js uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version-file: '.nvmrc' cache: 'pnpm' - name: Install dependencies run: pnpm install --frozen-lockfile --filter=e2e-docs... - name: Install Playwright Chromium run: pnpm -C e2e/docs exec playwright install chromium --with-deps --only-shell - name: Run accessibility scan working-directory: e2e/docs run: pnpm run e2e:docs:all --grep @a11y env: PLAYWRIGHT_BASE_URL: https://supabase.com DOCS_A11Y_FAILURES_FILE: ${{ github.workspace }}/e2e/docs/a11y-failures.json DOCS_E2E_DEPLOYED_ONLY: 1 - name: Upload failures for the alert # docs-alert.ts reads this file through RESULTS_WORKFLOWS if: always() uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: docs-failures-${{ github.run_attempt }} path: e2e/docs/a11y-failures.json retention-days: 7 if-no-files-found: ignore - name: Upload Playwright report if: failure() uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: docs-a11y-playwright-report path: | e2e/docs/playwright-report/ e2e/docs/test-results/ retention-days: 7