How do you check a website after every deploy?
Last updated: 18 November 2026
Check a website after every deploy by comparing the preview or the fresh deploy with production, page by page, on three checks: every page still exists, its content is unchanged, and its screenshot looks the same. Run the comparison from the pipeline that deploys, so each deploy ends with a list of the pages that changed instead of a manual click-through.
Before you paste a snippet
Without a key, the daily allowance of the calling address applies: 100 comparison pages a day, and a pool shared by all callers can run out before it. Hosted CI runners share their addresses with other projects, and a deploy hook often arrives from a new address on each run, so a pipeline should send a key. A prepaid key is debited for each run; a Pro account’s key draws on its monthly allowance of captured pages. Keys and setup are described on the agents page.
GitHub Actions
- uses: difficat/difficat@v1
with:
source: https://www.your-site.test
target: ${{ steps.preview.outputs.url }}
max-pages: 50
key: ${{ secrets.DIFFICAT_KEY }} source is production and target is the preview URL your deploy step returns. The step fails when a page fails, and the job summary names the failed pages.
Any deploy hook
npx difficat compare https://www.your-site.test https://preview.your-site.test --max-pages 50 Production comes first, the preview second. Exit codes: 0 every page passed, 1 a page failed, 2 payment required, 3 an error. The command reads a key from the DIFFICAT_KEY environment variable; set it from your pipeline’s secret store, not on the command line. npx fetches the newest published release when none is installed; write difficat@ followed by a version to pin one.
An agent over MCP
diff_deploy({
"productionUrl": "https://www.your-site.test",
"previewUrl": "https://preview.your-site.test",
"maxPages": 50
}) The tool’s default page count is lower than the command’s, so the snippet sets maxPages. A key is sent by the MCP client as a request header in its configuration and is never passed as a tool argument. Under a prepaid key, an agent that retries the call passes the same idempotencyKey again, so the run is not charged twice.
When the address changes on every run
A keyless check_page baseline belongs to the calling address and client name, and is lost when the address changes. If your pipeline or hook runs from a new address each time, compare against production on each run, as the three snippets above do, or send a key, which keeps the baseline with the key.
What this does not do
- Both URLs must resolve on the public internet. Localhost, loopback and private-network addresses are refused, so a preview that deploys only inside a private network must be reachable at a public URL.
- Pages are rendered in headless Chromium only.
- Content that differs between two loads of the same page, such as a rotating banner or a timestamp, is reported as a change.
- An intended change is reported like any other, so a person or an agent still decides whether the deploy is good.
- On a pull request from a fork, which receives no secret, the Actions step skips the comparison and reports success: that run is green and checked nothing.
Moving a site instead of deploying one? The website migration testing checklist covers the same three checks for a migration.
Try it on your own deploy
Enter production and your preview in the try-it form to see the report before you wire it into a pipeline.