Skip to the content

Deploys

Ranky is most useful right after a deploy: it scans what shipped, and names the deploy on every issue it brought in.


There are four ways to tell Ranky about a deploy. Use the one closest to how you ship; they work together, and a deploy reported twice is scanned once.

The deploy webhook (any pipeline)

One request from the step after your deploy. Make a key in the site's SettingsthenDeploys (its ID and the address are there too), keep it in your pipeline's secrets as RANKY_API_KEY, and send:

Terminal
curl -fsS -X POST "https://ranky.dev/api/v1/projects/YOUR_SITE_ID/deployments" \
  -H "Authorization: Bearer $RANKY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com", "environment": "production", "commitSha": "'"$(git rev-parse HEAD)"'", "branch": "'"$(git rev-parse --abbrev-ref HEAD)"'"}'
url
The address the deploy is served at.
environment
"production" starts a scan of the site. "preview" scans the preview at url and compares it with production; its address must be on another host than the site.
commitSha optional
The commit that was deployed. Issues it brings in name it.
branch optional
The branch it was deployed from.
prNumber optional
The pull request, when there is one.
author optional
Who deployed it.
deployId optional
Your pipeline's own ID for this deploy. Sent twice, it counts once, so a retried step starts one scan.

A production deploy starts a scan of the site. A preview deploy is scanned at its own address and compared with production: what is new on the preview, and what differs. Deploy scans are part of the Starter plan and up.

The GitHub App

Install Ranky's GitHub App on a repository from the site's SettingsthenGitHub and pick the repository. Then every deployment GitHub records (Vercel, Netlify and others report theirs to GitHub) starts a scan, and:

  • a check run on the commit lists the issues the deploy brought in;
  • a pull request's preview gets one comment, updated as scans finish;
  • the quality gate fails the check when the deploy brings in issues at or above the severity you choose, so a branch protection rule can stop the merge.

The GitHub App is part of the Pro plan and up.

Vercel

In the site's SettingsthenPreviews, link the Vercel project and add the webhook address Ranky shows to Vercel (events: Deployment Succeeded and Deployment Promoted). Each preview is compared with production; a promotion starts a scan.

Protected previews

Paste a Protection Bypass for Automation secret on the same page. Ranky sends it with its requests to your previews only.

The GitHub Action and the CLI

To fail a workflow on what a preview brings in, add Ranky's GitHub Action after the deploy step, or run npx @useranky/cli scan in any CI. See CLI and MCP.