---
title: "Platforms"
description: "Where Vercel, Netlify, and GitHub Actions hand out the deploy hook, and the request options each one needs."
canonical_url: "https://kirby.tools/docs/deploy-trigger/platforms"
---

# Platforms

> Where Vercel, Netlify, and GitHub Actions hand out the deploy hook, and the request options each one needs.

## Vercel

Create a deploy hook under **Settings → Git → Deploy Hooks** of your project, as described in [Vercel's deploy hooks guide](https://vercel.com/docs/deploy-hooks), and use its URL as the `deployUrl`. The URL needs no token.

## Netlify

Create a build hook as described in [Netlify's build hooks guide](https://docs.netlify.com/build/configure-builds/build-hooks/), and use its URL as the `deployUrl`. The URL needs no token.

## GitHub Actions

A GitHub Actions workflow starts on a [`repository_dispatch`](https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#repository_dispatch) event. Add it to the triggers of the workflow that deploys your site:

```yaml [.github/workflows/deploy.yml]
on:
  repository_dispatch:
    types: [deploy]
```

The workflow file has to be on the repository's default branch; on any other branch, GitHub accepts the request and starts nothing.

GitHub's API needs a token, a user agent, and a JSON body, so send them through `requestOptions`. A fine-grained personal access token needs write access to the repository's **Contents**:

```php [site/config/config.php]
return [
    'johannschopplich.deploy-trigger' => [
        'deployUrl' => 'https://api.github.com/repos/<owner>/<repo>/dispatches',
        'requestOptions' => [
            'agent' => 'kirby-deploy-trigger',
            'headers' => [
                'Accept' => 'application/vnd.github+json',
                'Authorization' => 'Bearer <token>',
                'Content-Type' => 'application/json'
            ],
            'data' => json_encode(['event_type' => 'deploy']) // matches the workflow's types
        ]
    ]
];
```

---

Every page of this site as Markdown: <https://kirby.tools/sitemap.md>
