Skip to content

Add a GitHub Action: preview or build vs production on every PR - #20

Merged
tmashara merged 1 commit into
mainfrom
github-action
Oct 24, 2026
Merged

tmashara merged 1 commit into
mainfrom
github-action

Conversation

@tmashara

Copy link
Copy Markdown
Owner

A composite action at the repo root (uses: tmashara/renderdiff@v0), per the v1 plan.

  • Runs src/cli.ts from the action's own ref on Node 22: no build, no npm version skew. npm ci --omit=dev --ignore-scripts, Chromium cached by Playwright version.
  • Waits up to wait-timeout for left to answer, then runs. The compact summary goes to the job summary, the out dir to an artifact, and the step fails on renderdiff's exit code (only errors fail without threshold).
  • accept records differences on the runner and puts renderdiff.accepted.json in the artifact. Pixel hashes don't match across macOS and Linux (checked: 4 of 12 Mac-accepted shots matched on Linux), so docs say accept in CI.
  • storage-state takes a secret's contents, written 0600 and deleted after the run.
  • Release workflow: tag pattern v*.*.*, and it moves v0 after publishing.
  • Self-test workflow: clean routes exit 0, /color + /tint under a threshold exit 1, accept writes the file.
  • Docs: docs/github-action.md (inputs, Vercel/Netlify preview, build in the job, Renovate/Dependabot), a short README section, a portability note in docs/accepted.md.

Cut from v1: sticky PR comment, provider API lookups for preview URLs, Vercel protection bypass headers.

🤖 Generated with Claude Code

Composite action at the repo root: runs src/cli.ts from the action's ref, caches
Chromium, waits for left, writes the compact summary to the job summary, uploads
the out dir, and fails on renderdiff's exit code. accept records differences on
the runner, since pixel hashes don't match across macOS and Linux. Releases move
the v0 tag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tmashara
tmashara merged commit 4a220e2 into main Oct 24, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant