DEVOPS

Post a Lighthouse scorecard comment on every preview PR

On each new Vercel preview, runs Lighthouse and posts a formatted scorecard as a sticky GitHub PR comment showing each category score and whether it improved or regressed versus…

CategoryDevOps
Enginesim
Difficultyintermediate
Triggerwebhook
Steps5
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerVercel preview deployment readyVercelVercel
  • ActionRun Lighthouse on preview URLShell
  • ActionRead and store baseline scoresPostgreSQLPostgres
  • LogicCompute per-category deltas
  • OutputUpsert sticky scorecard comment on PRGitHubGitHub

What it does

This workflow gives reviewers an at-a-glance quality scorecard inside the pull request. For every preview deploy it audits the preview URL with Lighthouse, looks up the stored scores for the PR's base branch, and posts a single sticky comment that lists each category with an up or down delta. The comment updates in place on each new push so the PR always shows current numbers.

When to use it

Use it when you want visibility into performance and accessibility trends per PR without blocking merges — a softer, informational counterpart to a hard gate.

How it works

  1. 1A Vercel preview-ready webhook supplies the preview URL, PR number, and base branch.
  2. 2A shell step runs Lighthouse and captures the category scores.
  3. 3An action reads the baseline scores for the base branch from Postgres, then writes the new scores back for next time.
  4. 4A logic step computes the per-category deltas and formats a markdown scorecard table.
  5. 5An action upserts a sticky comment on the GitHub PR with the scorecard, replacing any prior comment from this workflow.

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 PostgresAny Postgres URL — query, write, migrate.
  4. 4
    Connect GitHubRepos, issues, pull requests, actions.
  5. 5
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  6. 6
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  7. 7
    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.