Skip to content

GitHub Action

The frontend-debugger-action runs a full audit on any URL directly inside your GitHub Actions workflow — no server setup required.

Quick start

yaml
# .github/workflows/audit.yml
name: Frontend Audit
on: [pull_request]

jobs:
  audit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: starkyru/frontend-debugger-action@main
        with:
          url: 'https://your-preview-url.example.com'

What is "your preview URL"?

The url input is the address of the page you want to audit. In CI this is typically:

ScenarioExample URL
Vercel PR previewhttps://my-app-git-pr-123.vercel.app
Netlify deploy previewhttps://deploy-preview-42--mysite.netlify.app
Staging serverhttps://staging.myapp.com
App started in CIhttp://localhost:3000

The action launches a headless Chrome, navigates to that URL, and runs all configured checks.

Inputs

InputDefaultDescription
urlrequiredURL to audit
formathtmlReport format: html, junit, or sarif
report-pathautoOutput path for the report file
chrome-port9222Chrome remote debugging port
skip-a11yfalseSkip accessibility audit
skip-contrastfalseSkip contrast check
skip-ariafalseSkip ARIA validation
tokens-filePath to design tokens JSON
diff-nameBaseline name for visual diff
post-pr-commenttruePost summary comment on the PR
github-tokengithub.tokenToken for posting PR comments
fail-on-violationstrueExit non-zero on violations
host-urlURL of a self-hosted reports server (see Hosted reports)

Outputs

OutputDescription
violations-countTotal number of violations found
report-urlShareable link to the report (hosted server or artifact URL)

Hosted reports

By default the HTML report is uploaded as a GitHub Actions artifact (expires after 90 days, requires login to view).

If you run fd-host (the self-hosted reports server), set host-url to get a permanent, shareable link:

yaml
- uses: starkyru/frontend-debugger-action@main
  with:
    url: ${{ steps.deploy.outputs.preview-url }}
    host-url: 'https://reports.uiprobe.dev'
  env:
    FD_HOST_TOKEN: ${{ secrets.FD_HOST_TOKEN }}

The action will POST the HTML report to your server and write the stable URL to the report-url output and to the PR comment.

PR comment

When post-pr-comment: true (default), the action upserts a comment on the pull request with a summary table and a link to the full report:

## Frontend Debugger Audit
| Check   | Status              |
|---------|---------------------|
| Overall | ❌ 3 violation(s)   |

[View full report](https://reports.uiprobe.dev/r/abc-123)

Full workflow example — PR preview with hosted reports

yaml
name: Audit PR preview
on: [pull_request]

jobs:
  audit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      # Deploy your app to get a preview URL (example: Vercel)
      - name: Deploy preview
        id: deploy
        uses: amondnet/vercel-action@v25
        with:
          vercel-token: ${{ secrets.VERCEL_TOKEN }}
          vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
          vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}

      # Audit the preview URL and post results to the PR
      - name: Audit
        uses: starkyru/frontend-debugger-action@main
        with:
          url: ${{ steps.deploy.outputs.preview-url }}
          host-url: 'https://reports.uiprobe.dev'
          format: sarif
        env:
          FD_HOST_TOKEN: ${{ secrets.FD_HOST_TOKEN }}

      # Also upload SARIF for GitHub Code Scanning annotations
      - name: Upload SARIF
        if: always()
        uses: github/codeql-action/upload-sarif@v3
        with:
          sarif_file: fd-audit-report.sarif
          category: frontend-debugger

SARIF — inline PR annotations

Use format: sarif to get violations as inline annotations on the PR diff:

yaml
- uses: starkyru/frontend-debugger-action@main
  with:
    url: ${{ env.PREVIEW_URL }}
    format: sarif

The action automatically uploads the SARIF file to GitHub Code Scanning.

JUnit — test reporting

Use format: junit to integrate with CI test reporters (Jenkins, CircleCI, etc.):

yaml
- uses: starkyru/frontend-debugger-action@main
  with:
    url: ${{ env.PREVIEW_URL }}
    format: junit
    report-path: test-results/frontend-audit.xml

Self-hosted reports server

To deploy your own reports server, see the fd-host package. A public instance is available at https://reports.uiprobe.dev.

Released under the MIT License.