CI/CD Quickstart
Set up automated UX audits in your CI/CD pipeline and run your first pull request audit in under 5 minutes
Run your first CI audit in under 5 minutes. By the end of this guide, you'll have automated UX audits running on every pull request.
Prerequisites
Before starting, you need:
- A CI/CD platform (GitHub Actions, GitLab CI, etc.)
- A preview deployment URL (or production URL for testing)
- A VertaaUX API key
Don't have an API key? Get one free at vertaaux.ai/auth/signin. The free tier includes 3 audits per day.
Step 1: Add Your API Key Secret
Add VERTAAUX_API_KEY as a secret in your CI platform:
- Go to your repository Settings > Secrets and variables > Actions
- Click New repository secret
- Name:
VERTAAUX_API_KEY - Value: Your API key (e.g.,
vx_live_abc123...) - Click Add secret
- Go to your project Settings > CI/CD > Variables
- Click Add variable
- Key:
VERTAAUX_API_KEY - Value: Your API key
- Check Mask variable for security
- Click Add variable
Set VERTAAUX_API_KEY as an environment variable in your CI platform's secret management.
Step 2: Create the Workflow File
Create a workflow file in your repository:
Create .github/workflows/ux-audit.yml:
name: UX Audit
on:
pull_request:
branches: [main]
jobs:
audit:
runs-on: ubuntu-latest
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install VertaaUX CLI
run: npm install -g @vertaaux/cli
- name: Run UX Audit
run: vertaa audit -u ${{ vars.PREVIEW_URL }} --fail-on error
env:
VERTAAUX_API_KEY: ${{ secrets.VERTAAUX_API_KEY }}Replace ${{ vars.PREVIEW_URL }} with your actual preview URL or configure it as a repository variable.
Add to .gitlab-ci.yml:
ux-audit:
stage: test
image: node:22
script:
- npm install -g @vertaaux/cli
- vertaa audit -u $CI_ENVIRONMENT_URL --fail-on error
only:
- merge_requestsStep 3: Push and See Results
- Commit and push your workflow file
- Open a pull request (or trigger your CI)
- Watch the CI output for audit results
Success Output
When the audit passes:
VertaaUX Audit Results
======================
URL: https://preview-abc123.vercel.app
Score: 87/100
Issues: 0 errors, 3 warnings, 5 info
Status: PASSEDFailure Output
When the audit finds errors:
VertaaUX Audit Results
======================
URL: https://preview-abc123.vercel.app
Score: 65/100
Issues: 2 errors, 8 warnings, 12 info
ERRORS:
1. [WCAG-1.1.1] Image missing alt text
Element: <img src="/hero.png">
Fix: Add descriptive alt attribute
2. [WCAG-2.4.4] Link has no accessible name
Element: <a href="/docs"><svg>...</svg></a>
Fix: Add aria-label or visible text
Status: FAILED (--fail-on error triggered)
Exit code: 1What You'll See
After setup, every pull request will show:
- CI check status - Pass/fail based on audit results
- Audit summary - Score and issue counts in logs
- Exit code - Determines CI pass/fail
Troubleshooting
"Unauthorized" Error
Your API key is missing or invalid:
Error: Unauthorized. Check your VERTAAUX_API_KEY.Fix: Verify the secret is set correctly and the key is valid.
"Preview not ready" / Timeout
The preview URL isn't accessible when the audit runs:
Error: Failed to fetch https://preview-abc123.vercel.app (timeout)Fix: Add a deployment status trigger (see GitHub Actions with Vercel) or wait for deployment:
- name: Wait for preview
run: |
for i in {1..30}; do
curl -s -o /dev/null -w "%{http_code}" $PREVIEW_URL | grep -q "200" && exit 0
sleep 10
done
exit 1Score Below Expected
Audit runs but score is lower than expected:
Fix: Start with lenient thresholds and tighten over time:
# Start lenient
- run: vertaa audit -u $URL --threshold 60 --fail-on error
# Then tighten
- run: vertaa audit -u $URL --threshold 80 --fail-on errorNext Steps
Now that you have basic CI integration working:
GitHub Actions Guide
Advanced workflows with PR comments, baselines, and caching
Other CI Platforms
GitLab CI, CircleCI, Jenkins, and Azure DevOps
Policy-as-Code
Branch-specific quality rules with vertaa.policy.yml
CLI Commands
All CLI options for audit, baseline, and comment commands
Was this page helpful?