DEVOPS

Gate PR merge on Vercel preview performance budget

Runs a headless performance and accessibility audit against each new Vercel preview and writes a pass/fail commit status back to the GitHub PR so merges are blocked…

CategoryDevOps
Enginesim
Difficultyadvanced
Triggerevent
Steps4
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerVercel preview deployment readyVercelVercel
  • ActionAudit preview URL in headless browserBrowserbase
  • LogicScores meet performance budget?
  • OutputWrite pass/fail commit status to PRGitHubGitHub

What it does

Every Vercel preview gets a performance and accessibility audit in a real browser. The workflow compares the scores against your configured budget (for example, performance >= 85, accessibility >= 90) and writes a GitHub commit status check on the pull request. If the preview is too slow or fails a11y, the required check goes red and the PR cannot merge.

When to use it

Use it to enforce a performance budget as a hard merge requirement, not a suggestion. Great for marketing sites and customer-facing apps where a regression in load time or accessibility should never reach production unnoticed.

How it works

  1. 1Vercel fires a deployment.ready webhook for a preview tied to a PR.
  2. 2A headless browser loads the preview URL and captures performance and accessibility metrics.
  3. 3A branch compares each metric to the configured budget thresholds.
  4. 4The flow posts a commit status (success or failure) to the GitHub PR head SHA, with the scores in the description.
  5. 5The required status check then gates the merge button automatically.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect VercelDeploys, runtime logs, analytics.
  2. 2
    Connect BrowserbaseHeadless browsers, sessions, replays.
  3. 3
    Connect GitHubRepos, issues, pull requests, actions.
  4. 4
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  5. 5
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  6. 6
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.