Skip to main content
JUMP TO:Quick StartCLI CommandsConfigurationPlaywright APIMCP ServerGitHub Actions
CI/CD / CI/CD Overview(10 of 37)

CI/CD Overview

Run the CLI in any Node-based CI environment after the target application or preview URL is reachable. Keep ordinary pull-request jobs comparison-only and update baselines in a separate, explicit workflow.

CI/CD Two-Lane Baseline Governance
FIG 01 · TWO-LANE CI/CD GOVERNANCE — LANE 1 PR COMPARISON (READ-ONLY) VS LANE 2 EXPLICIT BASELINE PROMOTION

Supported path

Frontguard is designed around a strict separation between comparing screenshots on a Pull Request and promoting new baselines:

Two-lane governance

Workflow LaneTriggerGit PermissionsWhat It Runs
Lane 1: PR Visual Gate (Comparison-Only)pull_requestcontents: readFetches origin/frontguard-baselines, boots the app (or points --url at a preview deployment), runs frontguard run, and uploads ./frontguard-report/ as a downloadable CI artifact. Never mutates baselines.
Lane 2: Explicit Baseline Promotionworkflow_dispatch (manual) or local developer terminalcontents: writeRuns frontguard update-baselines --confirm-baselines after human review and pushes the updated manifest and deduplicated PNGs to origin/frontguard-baselines.

Output

JSON is emitted to stdout only. Redirect it to ./frontguard-result.json if another step needs a file. The HTML report is written under the configured output directory.

ci step: saving JSON and HTML artifacts
# Run comparison and tee JSON output while preserving exit code:
$ npx -p @frontguard/cli frontguard run --output json > ./frontguard-result.json

Action status

PR comments need a GitHub token and may be text-only unless an imageUpload backend is configured. The public composite Action still needs an external consumer smoke test.