Skip to content

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.

You just need to Add Notification, choose the Outgoing webhook type and paste your deploy hook URL like this:

Netlify screenshot

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, you can use the free HTTP post hook add-on, like this:

Example: Heroku

$ heroku addons:create deployhooks:http --url $SCHEDULE_URL

Heroku only allows one HTTP deploy hook per app, so if you need to trigger several hooks, you can set it up using deploy hook forker.

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.