PHPackages                             keyagency/deployer-recipes - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. keyagency/deployer-recipes

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

keyagency/deployer-recipes
==========================

Key Agency's shared Deployer 8 recipes

v1.1.0(1w ago)055↓57.5%proprietaryPHPPHP ^8.3CI passing

Since Jun 4Pushed 1w agoCompare

[ Source](https://github.com/keyagency/deployer-recipes)[ Packagist](https://packagist.org/packages/keyagency/deployer-recipes)[ Docs](https://keyagency.nl)[ RSS](/packages/keyagency-deployer-recipes/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (9)Dependencies (6)Versions (11)Used By (0)

keyagency/deployer-recipes
==========================

[](#keyagencydeployer-recipes)

Key Agency's shared [Deployer 8](https://deployer.org) recipes: a base `key`recipe (Slack notifications + healthcheck) and per-platform wrappers with build and content-sync tasks.

Install
-------

[](#install)

```
composer require --dev keyagency/deployer-recipes
```

Supported platforms
-------------------

[](#supported-platforms)

Each platform has its own section below with everything you need: the require, the tasks and the configuration.

PlatformSectionPlatform docsLaravel[Laravel](#laravel)[laravel.com/docs](https://laravel.com/docs)Statamic[Statamic](#statamic)[statamic.dev](https://statamic.dev)October CMS[October CMS](#october-cms)[docs.octobercms.com](https://docs.octobercms.com)WordPress (Bedrock)[WordPress (Bedrock)](#wordpress-bedrock)[roots.io/bedrock/docs](https://roots.io/bedrock/docs/)Is your platform not listed? See [Adding a platform](#adding-a-platform).

All platforms
-------------

[](#all-platforms)

Every wrapper loads Deployer's base recipe for that platform plus the shared `key` recipe. In your project's `deploy.php`, require the wrapper for your platform and define your host:

```
namespace Deployer;

require 'vendor/keyagency/deployer-recipes/recipe/key/.php';

host('production')->set('deploy_path', '/var/www/example');
```

The shared `key` recipe registers on every platform:

- `key:notify:start` / `key:notify:success` / `key:notify:failure` — Slack messages, wired into the deploy flow (`before deploy`, `after deploy:success`, `after deploy:failed`).
- `key:healthcheck` — runs after `deploy:success` and fails the deploy if the HTTP status of `key_healthcheck_url` does not match `key_healthcheck_expected_status`.

It also runs `deploy:unlock` after `deploy:failed`, so a failed deploy never leaves the release locked.

To enable Slack notifications, add the webhook to your project's `.env`(picked up automatically — no webhook means no notifications):

```
KEY_SLACK_WEBHOOK=https://hooks.slack.com/services/...
```

A real environment variable `KEY_SLACK_WEBHOOK` (e.g. in CI) takes precedence over the `.env` file, and an explicit `set('key_slack_webhook', ...)` in `deploy.php` wins over both.

> No webhook URL is bundled in this package. Each project supplies its own, so installing the package never posts to anyone else's Slack.

All custom config keys are prefixed with `key_` to avoid collisions with Deployer's own options. The shared recipe also sets a few Deployer defaults: `git_tty` (`true`), `writable_mode` (`'skip'`) and `allow_anonymous_stats`(`false`). Override them in your project's `deploy.php` when needed.

### Shared configuration

[](#shared-configuration)

KeyDefaultDescription`key_platform`per wrapper (`LARAVEL`, `STATAMIC`, `OCTOBER CMS`, `BEDROCK`)Label that prefixes task descriptions and log output, e.g. `[STATAMIC] Syncing ...`.`key_slack_webhook``KEY_SLACK_WEBHOOK` from env/`.env`, else `''`Slack incoming-webhook URL. Empty = notifications disabled.`key_slack_title``{{application}}`Slack message title.`key_slack_text``Deploy of \`{{target}}` to *{{alias}}* on `{{hostname}}``Slack message body.`key_healthcheck_url``''`URL to check after a successful deploy. Empty = disabled.`key_healthcheck_expected_status``200`Expected HTTP status.`key_healthcheck_retries``3`Attempts before the healthcheck fails the deploy.`key_healthcheck_pause``5`Seconds to wait between healthcheck attempts.How syncing works
-----------------

[](#how-syncing-works)

Statamic and October CMS ship `key:sync:*` tasks that rsync content between the server and your machine. They are not wired into the deploy flow; call them directly, e.g. `dep key:sync:content production`.

- You are asked once for the direction (remote → local by default) and, when pushing to remote, for overwrite/delete confirmation.
- Every sync type has its own `key_sync_` option holding a flat list of paths: a trailing slash marks a directory (which may mirror deletions and gets the optional backup), no trailing slash marks a single file (never deleted). Use Deployer's `add()` to append project-specific paths without redeclaring the defaults:

    ```
    add('key_sync_content', ['resources/navigation/']);
    ```
- Sources that do not exist are skipped, types without configured paths are skipped entirely, and a non-default SSH port on the host is respected.
- With `key_sync_backup` enabled, the destination directory is copied to `-backup` before each sync.

### Sync configuration

[](#sync-configuration)

KeyDefaultDescription`key_sync_`per platformPaths to sync per type; see the platform sections for the available types and defaults. Extend with `add()` or override with `set()`.`key_sync_excludes``[]` (October CMS: `['blocks.yaml']`)Rsync exclude patterns applied to every sync.`key_sync_backup``false`Copy the destination dir to `-backup` before each sync.Laravel
-------

[](#laravel)

```
require 'vendor/keyagency/deployer-recipes/recipe/key/laravel.php';
```

Loads Deployer's `laravel` recipe plus the shared `key` recipe.

### Tasks

[](#tasks)

- `key:build:resources` — builds the frontend locally (in a temporary git worktree, using the remote `.env`) and uploads `public/build/` to the server. Wired into the deploy flow via `after('deploy:vendors', 'key:build:resources')`; override the `deploy` task to change or remove it.

### Configuration

[](#configuration)

KeyDefaultDescription`key_build_tmp_path``/deployer-build`Base dir for the temporary build worktree.`key_build_command``yarn && yarn build`Local build command.Statamic
--------

[](#statamic)

```
require 'vendor/keyagency/deployer-recipes/recipe/key/statamic.php';
```

Loads Deployer's `statamic` recipe plus the shared `key` recipe, and shares `public/assets` and `content` between releases. The `deploy` task is overridden to drop `statamic:stache:warm`; `statamic:stache:clear` is kept so new content is picked up (the Stache lives in shared storage and the watcher is disabled in production), but the slow warming is skipped and the Stache rebuilds lazily on the next request, which avoids slow deploys on large sites. Make sure the watcher is disabled in production (`STATAMIC_STACHE_WATCHER=auto`).

### Tasks

[](#tasks-1)

- `key:build:resources` — builds the frontend locally (in a temporary git worktree, using the remote `.env`) and uploads `public/build/` to the server. Wired into the deploy flow via `after('deploy:vendors', 'key:build:resources')`; override the `deploy` task to change or remove it.
- `key:sync:content` / `key:sync:assets` / `key:sync:forms` / `key:sync:addons`— see [How syncing works](#how-syncing-works). `key:sync:content` can also include forms, addons and assets in one run. After each sync the Statamic stache is refreshed.

### Configuration

[](#configuration-1)

KeyDefaultDescription`key_build_tmp_path``/deployer-build`Base dir for the temporary build worktree.`key_build_command``yarn && yarn build`Local build command.`key_sync_content``['content/', 'resources/users/', 'resources/sites.yaml', 'resources/preferences.yaml']`Paths synced by `key:sync:content`.`key_sync_assets``['public/assets/']`Paths synced by `key:sync:assets`.`key_sync_forms``['resources/forms/', 'resources/blueprints/forms/']`Paths synced by `key:sync:forms`.`key_sync_addons``['resources/addons/']`Paths synced by `key:sync:addons`.October CMS
-----------

[](#october-cms)

```
require 'vendor/keyagency/deployer-recipes/recipe/key/october.php';
```

Loads Deployer's `laravel` recipe (October CMS is built on Laravel) plus the shared `key` recipe. The `deploy` task is overridden to run the October CMS migrations (`october:migrate`) and mirror plugin and module assets into `public/` (`october:mirror`) before publishing, and to write the deployed git revision to `.version` (`system:update`).

### Tasks

[](#tasks-2)

- `october:migrate` / `october:mirror` — run `artisan october:migrate` and `artisan october:mirror` in the release. Part of the overridden `deploy` task.
- `system:update` — writes `VERSION=` to `.version` in the release, read from Deployer's `REVISION` file. Part of the `deploy` task.
- `key:asset:version` — writes the first 8 characters of the deployed commit as `ASSET_VERSION=` to the shared `.env`, for cache busting asset URLs with `?v=`. Part of the `deploy` task; skips with a warning when the `REVISION` file is missing.
- `key:sync:theme` / `key:sync:storage` — see [How syncing works](#how-syncing-works). `theme` syncs `themes//content/` and `themes//meta/` for every theme in `key_october_themes`; `storage` syncs `storage/app/uploads/` and `storage/app/media/`. `blocks.yaml` is excluded by default. After each sync the October CMS cache is cleared.

To sync an extra theme, only the theme list needs to change:

```
set('key_october_themes', ['default', 'second-theme']);
```

### Configuration

[](#configuration-2)

KeyDefaultDescription`key_october_themes``['default']`Themes whose `content/` and `meta/` are synced by `key:sync:theme`.`key_sync_theme`derived from `key_october_themes`Paths synced by `key:sync:theme`. Set the themes before calling `add('key_sync_theme', ...)`.`key_sync_storage``['storage/app/uploads/', 'storage/app/media/']`Paths synced by `key:sync:storage`.WordPress (Bedrock)
-------------------

[](#wordpress-bedrock)

```
require 'vendor/keyagency/deployer-recipes/recipe/key/bedrock.php';

set('key_bedrock_theme', 'my-theme');
```

Loads Deployer's `common` recipe (with `deploy:vendors` in the deploy flow, since Bedrock is composer-based) plus the shared `key` recipe, and shares `.env`, `web/.htaccess` and `web/app/uploads` between releases.

### Tasks

[](#tasks-3)

- `key:build:resources` — runs `key_build_command` locally in `web/app/themes/` and uploads the build artifacts from `key_build_uploads` (default `assets/js/` and `style.css`) to the same theme path on the server. Skips with a warning when `key_bedrock_theme` is not set.
- `key:install:languages` — downloads `wp-cli.phar` into the release and installs the core, plugin and theme languages for every language in `key_languages`.

Neither task is wired into the deploy flow; call them directly or wire them in your project's `deploy.php`:

```
after('deploy:vendors', 'key:build:resources');
before('deploy:publish', 'key:install:languages');
```

### Configuration

[](#configuration-3)

KeyDefaultDescription`key_bedrock_theme``''`Theme folder name; required for `key:build:resources`.`key_bedrock_theme_path``web/app/themes/`Theme path; override for a non-standard layout.`key_build_command``yarn && yarn build`Local build command.`key_build_uploads``['assets/js/', 'style.css']`Build artifacts to upload, relative to the theme path. Trailing slash = directory, no slash = single file.`key_languages``['nl_NL']`Languages installed by `key:install:languages`.Adding a platform
-----------------

[](#adding-a-platform)

Create `recipe/key/.php` that requires the matching Deployer base recipe and the shared `key` recipe:

```
namespace Deployer;

require_once 'recipe/.php';

set('key_platform', '');

require_once __DIR__ . '/../key.php';
```

`key_platform` must be set before requiring `key.php`, so the task descriptions pick up the `[]` prefix.

Platform-specific features live in per-feature files under `recipe/key//` (e.g. `recipe/key/october/sync.php`), required by the wrapper. Sync features build on the shared helpers in `recipe/helpers/sync.php`: define a `key_sync_` option per sync type (a flat list of paths) and register tasks that call `key_sync_prompt()` and `key_sync()`. Platforms with a Vite build get the `key:build:resources` task by requiring the shared `recipe/helpers/build.php`, as the Laravel and Statamic wrappers do.

About Key Agency
----------------

[](#about-key-agency)

[Key Agency](https://keyagency.nl) is a digital agency based in Amsterdam that helps brands grow with strategy, content, technology and advertising working together as one digital ecosystem. Our development team builds and maintains websites and platforms (Laravel, Statamic, October CMS and WordPress) and uses these recipes to deploy them.

Contact
-------

[](#contact)

Questions, remarks or suggestions? Reach us at .

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance98

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~4 days

Total

10

Last Release

10d ago

PHP version history (3 changes)v1.0.0PHP &gt;=8.1

v1.0.3PHP &gt;=8.3

v1.1.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/a06cd15447fcfb631b0e29aa3c1a294231260879dfbc3f8e27d8b12f5376d65c?d=identicon)[Key Agency](/maintainers/Key%20Agency)

---

Top Contributors

[![DonnyOexman](https://avatars.githubusercontent.com/u/109585341?v=4)](https://github.com/DonnyOexman "DonnyOexman (32 commits)")

---

Tags

deployerdeployer-phpdeployer-recipes

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/keyagency-deployer-recipes/health.svg)

```
[![Health](https://phpackages.com/badges/keyagency-deployer-recipes/health.svg)](https://phpackages.com/packages/keyagency-deployer-recipes)
```

###  Alternatives

[lorisleiva/laravel-deployer

Laravel Deployer is a lightweight wrapper of Deployer giving Artisan the power of zero-downtime deployment.

1.7k1.3M4](/packages/lorisleiva-laravel-deployer)[sourcebroker/deployer-extended

Library with some additional tasks for deployer (deployer.org).

25292.2k12](/packages/sourcebroker-deployer-extended)[hypernode/deploy-configuration

Hypernode deploy configuration files

12133.0k](/packages/hypernode-deploy-configuration)[ngmy/webloyer

Webloyer is a Web UI for managing Deployer deployments

2191.1k](/packages/ngmy-webloyer)[n98/n98-deployer

netz98 deployer tasks, recipes, configuration

2444.7k1](/packages/n98-n98-deployer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
