CI
Fail a build when a deploy breaks links, headers or SEO basics, and post the findings to the pull request.
webtrax check exits 1 when a finding reaches --fail-on (high by default), so it works as a gate in any CI system. Point it at the preview deploy of the change.
GitHub Actions
name: Webtrax
on: deployment_status
jobs:
check:
if: github.event.deployment_status.state == 'success'
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with: { node-version: 22 }
- name: Check the preview deploy
run: npx -y @webtrax/cli check "$URL" --fail-on high --stdout md >> "$GITHUB_STEP_SUMMARY"
env:
URL: ${{ github.event.deployment_status.environment_url }}
Vercel, Netlify and Cloudflare Pages all report preview deploys as GitHub deployments, so deployment_status fires for each preview. The Markdown report lands in the job summary; the exit code fails the check.
GitHub code scanning
Write SARIF and upload it, and findings show up in the repository’s Security tab and on pull requests:
- name: Check the site
run: npx -y @webtrax/cli check "$URL" --reports sarif --out webtrax --fail-on none
- uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: webtrax/runs
category: webtrax
--fail-on none lets the upload step run; code scanning then decides what blocks a merge. --reports junit writes JUnit XML for CI dashboards that read test results.
Only fail on what the change added
Keep the previous run and compare: webtrax diff lists new, fixed and persisting findings by fingerprint, so you can fail only on new problems while you work through old ones.
Exit codes
0 ok, 1 findings at or above --fail-on, 2 usage or configuration error, 3 the site could not be crawled. See the CLI reference.