New to Kestra?
Use blueprints to kickstart your first workflows.
Post-deploy Lighthouse audit that scores performance, accessibility, and best practices against your budgets and alerts Slack when any drops below.
Deploys rarely break a site outright, they shave points. A new chat widget drops accessibility, a hero video drags performance, a third-party tag trashes best practices, and the dashboard nobody looks at records it all in silence. This blueprint makes the score a gate: Lighthouse runs against the URL you just deployed, the three category scores are compared with budgets you set, and any breach lands in Slack with the actual numbers beside the floors they broke. Passing runs log their scores too, so the execution history is your score trend release over release.
run_lighthouse (io.kestra.plugin.scripts.shell.Commands on the Docker task runner) uses node:20-bookworm by default, installs Chromium and pinned lighthouse@12 (pin keeps scores comparable across runs), audits the URL headlessly with --no-sandbox --disable-dev-shm-usage for container friendliness, and emits performance, accessibility, and best_practices through the ::{"outputs": ...}:: protocol. Missing categories coerce to 0 so a crashed category can never compare as "passing". Point lighthouse_image at a prebaked image with Chromium and Lighthouse already installed to make runs fast.check_budget (io.kestra.plugin.core.flow.If) tests all three scores against their inputs in one condition. Any breach: alert_budget_breach posts each score next to its floor; all clear: log_within_budget records the scores for the trend.errors block alerts Slack when the audit itself fails, no score must never read as a passing score.Webhook (perf-budget-check) for the deploy pipeline plus a disabled daily Schedule to catch third-party drift that arrives without a deploy.score_summary JSON output for dashboards or a downstream approval step.Lighthouse itself produces a report nobody opens; the flow turns it into a decision. Kestra adds the event entry point (post-deploy webhook), the budget branch, the alert, the self-reporting failure channel, and the history, and because the gate is a flow, the natural next step (block the deploy, open a ticket, compare with yesterday's scores) is one task away.
lighthouse_image.SLACK_WEBHOOK_URL: Slack incoming webhook URL for budget and audit-failure alerts.url to your site and tighten the three budgets to your targets (defaults are deliberately lenient at 0.5 so the first run demonstrates the path).score_summary, compare against a browser's Lighthouse panel if you like.perf-budget-check webhook from your deploy pipeline.io.kestra.plugin.core.execution.Fail task after the Slack alert in the then branch.--only-categories (SEO, PWA) and the budget condition.score_summary in KV and alert only on drops relative to yesterday's score.