DEVOPS

Block GitLab MR promotion until Vercel preview passes Lighthouse

When a Vercel preview deploy finishes for a GitLab merge request, run Lighthouse against the preview URL and block promotion to staging unless performance, accessibility.

CategoryDevOps
Enginesim
Difficultyintermediate
Triggerwebhook
Steps5
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerVercel preview deployment readyVercelVercel
  • ActionRun Lighthouse CLI against preview URLShell
  • LogicCheck each category against threshold
  • ActionSet GitLab pipeline status (fail blocks merge)GitLabGitLab
  • OutputComment score breakdown on the MRGitLabGitLab

What it does

Gates merge-request promotion on real Lighthouse results from the live Vercel preview. The MR cannot advance until the deploy hits every category threshold, and the four scores are posted as an MR comment so reviewers see exactly where it stands.

When to use it

Use it when your team merges to staging through GitLab and you want a hard quality floor instead of a courtesy reminder. Ideal for product teams that have been shipping regressions in performance or accessibility that slipped past human review.

How it works

  1. 1A Vercel deployment-ready webhook fires with the preview URL and the source MR.
  2. 2A shell step runs the Lighthouse CLI against the preview URL and emits JSON for all four categories.
  3. 3A logic branch compares each category score against its configured threshold.
  4. 4If any category fails, the GitLab pipeline status is set to failed, blocking the merge.
  5. 5Either way, a comment with the per-category scores and pass/fail verdict is posted to the MR thread.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect VercelDeploys, runtime logs, analytics.
  2. 2
    Connect ShellRun sandboxed commands inside the workspace.
  3. 3
    Connect GitLabRepos, MRs, pipelines, registry.
  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.