Documentation Menu

Continuous Baselines (Hybrid)

The high-efficiency workflow: Automated updates on merge combined with static baselines for speed and maximum reliability.

The Efficiency Play

The Continuous Baseline model is a hybrid between live comparisons (Preview vs Production) and Managed Baselines. It provides the zero-maintenance automation of "Preview vs. Prod" with the speed and cost-savings of static S3 images.

Stable Reference

All PRs in a cycle compare against the same fixed snapshot. The baseline can't shift while your feature is in review.

Merging is Approving

Shipping to main automatically seals the new UI as the next baseline. No manual approval steps.

Fewer False Positives

Production is captured once at merge, not re-rendered on every check. Dynamic content and CDN variance don't pollute your results.

How it Works

1

PR Phase: Fast Checks

Pull Requests compare the Preview URL against the existing S3 Baselines. The CI check simply ensures that developers are aware of visual changes, but does not block merging if the visual changes are expected.

2

Merge Phase: Automated Seal

Once code hits main, a GitHub Action captures the new look of the live site and uses the --auto-approve flag to automatically seal it as the new "Golden Image" baseline for all future PRs.

Implementation Guide

This setup requires two distinct workflows: one to check PRs, and one to update baselines automatically on merge.

1. The PR Check (Speed Optimized)

# Triggered on Pull Request
- name: Setup Node.js
  uses: actions/setup-node@v4
  with:
    node-version: 20

- name: Run RegressionBot
  run: npx regressionbot ${{ steps.preview.outputs.url }} --project "my-app"
  env:
    REGRESSIONBOT_API_KEY: ${{ secrets.REGRESSIONBOT_API_KEY }}
  # NOTICE: --against is omitted — compares against your stored S3 baselines

2. The Baseline Update (On Merge)

# Triggered on Push to Main
- name: Setup Node.js
  uses: actions/setup-node@v4
  with:
    node-version: 20

- name: Update RegressionBot Baselines
  run: npx regressionbot https://myapp.com --project "my-app" --auto-approve
  env:
    REGRESSIONBOT_API_KEY: ${{ secrets.REGRESSIONBOT_API_KEY }}
  # NOTICE: --auto-approve automatically seals the results as the new baseline