Skip to main content

User guides

Deploy hooks

Use deploy hooks to notify Rocket Validator that you've deployed a new version of your site and make it start automatically the specified validation.

To create a deploy hook, create a schedule as explained in the Scheduling reports section.

Then, copy the supplied schedule URL (which will be something like https://rocketvalidator.com/schedule/abcd/1234/fire) and set up your hosting platform to fire this schedule after deploys. We will refer to this URL as $SCHEDULE_URL in the examples below.

curl

curl is a command-line tool, present in most systems, that you can use to make a quick check from your terminal.

Example: curl

$ curl -X POST $SCHEDULE_URL

Netlify

Netlify is a hosting platform for static websites, and offers the simplest integration possible.

In the Project Configuration page for your site at Netlify, go to Notifications and open Deploy notifications. There, click on Add notification and choose HTTP Post Request, like this:

Netlify screenshotNetlify screenshot

Pick an event such as Deploy succeeded and paste your schedule URL in the URL to notify field.

GitHub Pages

GitHub Pages let you define webhooks for different events.

You just need to enter your automatic validator URL in the Payload URL field, and choose the individual event for page build:

GitHub pages screenshot

GitHub Pages lets you define several deploy hooks for different services.

Heroku

If your site is on Heroku, use App Webhooks (the legacy Deploy Hooks add-on was retired in 2023). To trigger a site validation on every release, run:

Example: Heroku

$ heroku webhooks:add -i api:release -l notify -u $SCHEDULE_URL -a your-heroku-app

Engine Yard

Engine Yard lets you define deploy hooks using simple ruby scripts. To trigger a site validation, you can create a deploy/after_restart.rb file on the root folder of your app, that sends the post-deploy hook using curl like this:

Example: Engine Yard

run "curl -X POST -d '' $SCHEDULE_URL"

Cloud 66

If your site is on Cloud 66, you can use their free deploy hooks to define your hooks per environment on a file named .cloud66/deploy_hooks.yml, like this:

Example: Cloud 66

staging:
last_thing:
- command: curl -X POST -d '' $SCHEDULE_URL
target: rails
run_on: single_server

Cloud 66 lets you have several deploy hooks defined. The syntax for doing that is:

Example: Cloud 66

last_thing:
- xxxxxx
yyyyyy
zzzzzz
- xxxxxx
yyyyyy
zzzzzz

Other platforms

If your hosting platform is not listed here, feel free to contact us and we'll help you with the integration.