We’ve all been there, you made a change that doesn’t warrant a git commit & push, a change in build command? Maybe. But want to retry a build & deploy on Cloudflare Pages.

Sure you can retry a failed deployment, but with the previous settings.

Deploy hooks to the rescue. These are meant to be called by CMS or outside the context of git integration, but can be useful to poke CF Pages to do another build.

You just go to your deployment settings and set up a deploy hook under Settings -> Builds & Deployments.

Create a new hook and save.

It will give you a URL like https://api.cloudflare.com/client/v4/pages/webhooks/deploy_hooks/some-token

Which you can call via a POST request.

Example:

curl -v -XPOST https://api.cloudflare.com/client/v4/pages/webhooks/deploy_hooks/some-token

I hope this saves you from those dreaded trigger ci commit messages and few seconds :)