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.
Supported path
Frontguard is designed around a strict separation between comparing screenshots on a Pull Request and promoting new baselines:
Two-lane governance
| Workflow Lane | Trigger | Git Permissions | What It Runs |
|---|---|---|---|
Lane 1: PR Visual Gate (Comparison-Only) | pull_request | contents: read | Fetches 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 Promotion | workflow_dispatch (manual) or local developer terminal | contents: write | Runs 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.
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.
