---
title: "Getting Started"
description: "Install the plugin, set the deploy hook URL, and add the deploy button to the site view or a page view."
canonical_url: "https://kirby.tools/docs/deploy-trigger"
---

# Getting Started

> Install the plugin, set the deploy hook URL, and add the deploy button to the site view or a page view.

Kirby Deploy Trigger is a plugin for [Kirby CMS](https://getkirby.com) that adds a Panel button to start a deployment on Vercel, Netlify, GitHub Actions, or any service with a deploy hook. Your server sends the request, so the hook URL and any token stay in `config.php`.

## Step 1: Install the Plugin

<card icon="i-ri-terminal-box-line" title="Composer">

The recommended way to install the plugin:

```bash
composer require johannschopplich/kirby-deploy-trigger
```

</card>

<card icon="i-ri-folder-zip-line" title="ZIP File Download">

Download the [latest release](https://github.com/johannschopplich/kirby-deploy-trigger/releases/latest) or head over to the [releases page](https://github.com/johannschopplich/kirby-deploy-trigger/releases) to see all versions. Extract the ZIP file to your `site/plugins` folder.

</card>

## Step 2: Set the Deploy Hook URL

Your hosting platform gives you a URL that starts a deployment when it receives a request. Set it as the `deployUrl`:

```php [site/config/config.php]
return [
    'johannschopplich.deploy-trigger' => [
        'deployUrl' => 'https://api.netlify.com/build_hooks/<hook-id>'
    ]
];
```

[Platforms](/docs/deploy-trigger/platforms) shows where Vercel, Netlify, and GitHub Actions hand out the URL.

## Step 3: Add the Button to a Blueprint

Add `deploy-trigger` to the `buttons` of the site blueprint:

```yaml [site/blueprints/site.yml]
buttons:
  - open # `buttons` replaces Kirby's
  - preview # defaults, so list them all
  - deploy-trigger
  - languages
```

A page blueprint takes the same entry.

To show the button in every page view without touching each page blueprint, set Kirby's [`panel.viewButtons`](https://getkirby.com/docs/reference/system/options/panel) option instead. A blueprint's `buttons` still take precedence:

```php [site/config/config.php]
return [
    'panel' => [
        'viewButtons' => [
            'page' => ['open', 'preview', 'deploy-trigger', '-', 'settings', 'languages', 'status']
        ]
    ]
];
```

## Step 4: Deploy From the Panel

Click **Deploy Site** in the view's header. A notification confirms once the deploy hook accepts the request. The deployment itself then runs on your platform, and the Panel doesn't follow it.

## When a Deployment Fails

A failed request shows up as a Panel error:

- A response outside the 2xx range names its status code, followed by the response body unless that is an HTML page.
- A hook that can't be reached – an unknown host, a timeout – shows the connection error.
- Without a `deployUrl`, the error names the missing option.

To send a token, a JSON body, or a longer timeout with the request, see [Configuration](/docs/deploy-trigger/configuration).

---

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