# Deploy hooks

> Canonical HTML version: https://rocketvalidator.com/docs/deploy-hooks
> Attribution: Rocket Validator (https://rocketvalidator.com)
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

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](https://rocketvalidator.com/docs/scheduling) section.

Then, copy the supplied schedule URL (which will be something like <code>https://rocketvalidator.com/schedule/abcd/1234/fire</code>) 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

<a href="https://curl.se/" target="_blank">curl</a> is a command-line tool, present in most systems, that you can use to make a quick check from your terminal.


> **Example: curl**
>
> ```bash
> $ curl -X POST $SCHEDULE_URL
> ```

## Netlify

<a href="https://www.netlify.com/" target="_blank">Netlify</a> 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 screenshot](https://rocketvalidator.com/images/docs/schedules/netlify01.webp)
![Netlify screenshot](https://rocketvalidator.com/images/docs/schedules/netlify02.webp)

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

## GitHub Pages

<a href="https://pages.github.com/">GitHub Pages</a> 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 <i>page build</i>:

![GitHub pages screenshot](https://rocketvalidator.com/images/docs/schedules/github-pages.webp)

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

## Heroku

If your site is on Heroku, use <a href="https://devcenter.heroku.com/articles/app-webhooks" target="_blank">App Webhooks</a> (the legacy Deploy Hooks add-on was retired in 2023). To trigger a site validation on every release, run:


> **Example: Heroku**
>
> ```bash
> $ heroku webhooks:add -i api:release -l notify -u $SCHEDULE_URL -a your-heroku-app
> ```

## Engine Yard

Engine Yard lets you define <a href="https://support.engineyard.com/en-us/article/45147-use-ruby-deploy-hooks">deploy hooks using simple ruby scripts</a>. To trigger a site validation, you can create a <i>deploy/after_restart.rb</i> file on the root folder of your app, that sends the post-deploy hook using curl like this:


> **Example: Engine Yard**
>
> ```bash
> run "curl -X POST -d '' $SCHEDULE_URL"
> ```

## Cloud 66

If your site is on <a href="http://cloud66.com" target="_blank">Cloud 66</a>, you can use their <a href="https://help.cloud66.com/deploy/deploy-hooks/deploy-hooks/" target="_blank">free deploy hooks</a> to define your hooks per environment on a file named <strong>.cloud66/deploy_hooks.yml</strong>, like this:


> **Example: Cloud 66**
>
> ```bash
> staging:
>   last_thing:
>     - command: curl -X POST -d '' $SCHEDULE_URL
>       target: rails
>       run_on: single_server
> ```

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


> **Example: Cloud 66**
>
> ```bash
> last_thing:
>   - xxxxxx
>     yyyyyy
>     zzzzzz
>   - xxxxxx
>     yyyyyy
>     zzzzzz
> ```

## Other platforms

If your hosting platform is not listed here, feel free to <a href="mailto:support@rocketvalidator.com">contact us</a> and we'll help you with the integration.
