Deploy hooks: deploy any host with one URL
A deploy hook is a secret URL from your host: one request to it starts a build of a branch you picked. Create it in the host's settings, call it with curl when you want to deploy, and turn off the host's build on every push, so the hook is the only thing that builds.
| Host | Where the hook is | Stop builds on push |
|---|---|---|
| Vercel | Project → Settings → Git → Deploy Hooks | Needs the Git connection, see below |
| Netlify | Site configuration → Build & deploy → Build hooks | An ignore command, or Stop builds (that stops hooks too) |
| Cloudflare Pages | Workers & Pages → project → Settings → Builds → Deploy hooks | Settings → Builds → Branch control |
| Coolify | The resource → Webhooks (needs an API token) | Auto Deploy off in the resource's settings |
| DigitalOcean App Platform | No anonymous hook: the API's new-deployment endpoint works as one | The component → Source → untick Autodeploy |
| GitHub Actions | A workflow with on: workflow_dispatch and its dispatches endpoint | Remove the push trigger from the workflow |
Call a hook
Most hooks take an empty POST. Keep the URL in a variable or a secret store, never in the repository:
curl -fsS -X POST "$DEPLOY_HOOK_URL"
A 2xx answer means the build was started, nothing more. The build can still fail at the host, so check it there. Do not retry blindly on a timeout: the first request may have started a build already, and a retry starts a second one.
Some endpoints need a token in a header. Coolify's deploy webhook is a GET with an API token; DigitalOcean's new-deployment endpoint is a POST with a token and a small body:
curl -fsS -H "Authorization: Bearer $COOLIFY_TOKEN" \
"https://coolify.example.com/api/v1/deploy?uuid=$UUID&force=false"
curl -fsS -X POST -H "Authorization: Bearer $DO_TOKEN" -H "Content-Type: application/json" \
-d '{"force_build":true}' "https://api.digitalocean.com/v2/apps/$APP_ID/deployments"
Vercel deploy hooks
In the project, open Settings → Git → Deploy Hooks, give the hook a name and a branch, and copy the URL. A POST to it builds the newest commit of that branch. Vercel keeps deploy hooks with the Git connection, so if you disconnect Git to stop builds on push, the hooks go with it. Without Git, deploy the remembered repository through the Vercel API instead; that is what deploys vercel deploy does.
Keep the URL secret
- Anyone with the URL can start builds, and builds cost minutes. Treat it like a password.
- Read it from stdin or an environment variable, so it stays out of your shell history and out of
ps. - In CI, store it as a secret. Never commit it, not even in a private repository.
- If it leaks, delete or rotate it at the host. Removing it from your own tools does not stop it from working.
Deploy hooks in Deploy Center
Deploy Center turns any such URL into a project you deploy by hand, next to Vercel and Render. It is opt-in:
deploys providers enable hook
pbpaste | deploys hook add blog - --repo me/blog --site https://blog.example.com
deploys changed # commits on the branch since the last trigger
deploys hook deploy blog # one request, never retried
The URL goes into the macOS keychain (on Linux a 0600 file) and is masked in every output. Header values can name an environment variable, like 'Authorization: Bearer $COOLIFY_TOKEN', so no token is stored in a file. A hook has no status API, so Deploy Center shows "triggered", not the build result. Every option and more examples: the deploy hook docs.
Questions
What is a deploy hook?
A secret URL from your host. A request to it, usually a POST, starts a build of a branch you chose when you made the hook. No login and no CLI are needed, only the URL.
Do Vercel deploy hooks work without a Git connection?
No. Vercel keeps deploy hooks in the project's Git settings and builds from the connected repository, so disconnecting Git removes them too.
Does a deploy hook tell me whether the build worked?
No. A 2xx answer only means the build was started. Whether it passed you see at the host.
Is the hook URL a secret?
Yes. Anyone with the URL can start builds. Keep it out of the repository and out of shell history, and delete or rotate it at the host if it leaks.
Deploy all your hosts from one window.
Deploy Center turns off auto-deploy on Vercel and Render in one click, adds Netlify, Cloudflare Pages, Coolify and any deploy hook opt-in, and deploys what changed when you decide. Free and open source for macOS.