CI/CD Integration

GitHub Action for Website Audits

Fail your build automatically if your site's SEO, security or performance score drops below your threshold. 2 lines of YAML.

Quick Start

Uses the AuditAI public API — no API key or GitHub Marketplace install required. Works on any runner with curl and jq (pre-installed on all GitHub-hosted runners).

.github/workflows/audit.yml
- name: AuditAI Website Audit
  run: |
    RESULT=$(curl -sf "https://auditai.fyi/api/check?url=https://yoursite.com")
    SCORE=$(echo "$RESULT" | jq -r '.overall_score // .score // 0')
    echo "AuditAI score: $SCORE"
    if [ "$SCORE" -lt 70 ]; then
      echo "Score $SCORE is below threshold 70 — failing build"
      exit 1
    fi

Add this step to any existing workflow — it runs in ~30 seconds.

How It Works

1

Add to your workflow

Copy the YAML snippet into any GitHub Actions workflow file. Point it at your production or staging URL.

2

Runs on every push

AuditAI scans your live URL and checks SEO, security headers, performance, and compliance in parallel.

3

Build fails if score drops

If the score falls below your threshold, the step fails with a clear error message showing the exact score and breakdown.

What Gets Checked

🔍
SEO
Meta tags, headings, canonical, schema
🔒
Security
CSP, HSTS, X-Frame, headers
Performance
Core Web Vitals signals
🛡️
Compliance
GDPR, CCPA, DPDP indicators

API Parameters

ParameterRequiredDefaultDescription
urlYesWebsite URL to audit (must be a live public URL)
thresholdNoIf set, response includes pass:true/false based on this score floor
formatNojsonResponse format — only json is supported

Full Workflow Example

.github/workflows/site-quality.yml
name: Site Quality Check
on:
  push:
    branches: [main]
  pull_request:

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

      - name: AuditAI Website Audit
        run: |
          URL="${{ secrets.PRODUCTION_URL }}"
          THRESHOLD=75
          RESULT=$(curl -sf "https://auditai.fyi/api/check?url=$URL")
          SCORE=$(echo "$RESULT" | jq -r '.overall_score // .score // 0')
          echo "AuditAI score: $SCORE / 100"
          echo "score=$SCORE" >> $GITHUB_OUTPUT
          if [ "$SCORE" -lt "$THRESHOLD" ]; then
            echo "❌ Score $SCORE is below threshold $THRESHOLD"
            exit 1
          fi
          echo "✅ Score $SCORE passed threshold $THRESHOLD"

Use the API Directly

For GitLab CI, CircleCI, Bitbucket or any other platform, call the AuditAI check API directly:

Any CI platform
curl "https://auditai.fyi/api/check?url=https://yoursite.com&threshold=70"

Returns JSON with score, pass, and full breakdown. No API key required.

FAQ

Does this work with any CI/CD platform?+

Yes — the integration uses the AuditAI public REST API via curl, which works on any CI platform: GitHub Actions, GitLab CI, CircleCI, Bitbucket Pipelines, Jenkins, and more. Any runner with curl and jq installed can use it.

What happens if my site is below the threshold?+

The step fails with an error message showing your score and the threshold. The build is marked as failed in GitHub. You can see the full score breakdown in the GitHub Actions step summary.

Does this slow down my builds?+

A scan typically takes 15–30 seconds. You can run it as a parallel job that doesn't block your main deployment, or run it as a post-deploy check.

Is this free?+

Yes — the AuditAI check API is free with a generous rate limit. No API key needed.

Test your site manually first

Run a free audit to see your current score before setting your CI threshold.

Free Audit →