PHPackages                             perspikapps/php-easy-deployer - 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. perspikapps/php-easy-deployer

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

perspikapps/php-easy-deployer
=============================

A deployer.org recipe with url-based easy configuration

v1.0.0(4y ago)021[1 issues](https://github.com/perspikapps/php-easy-deployer/issues)[3 PRs](https://github.com/perspikapps/php-easy-deployer/pulls)MITPHPPHP ^7.4

Since May 23Pushed 1w agoCompare

[ Source](https://github.com/perspikapps/php-easy-deployer)[ Packagist](https://packagist.org/packages/perspikapps/php-easy-deployer)[ Docs](https://github.com/perspikapps/php-easy-deploy)[ RSS](/packages/perspikapps-php-easy-deployer/feed)WikiDiscussions develop Synced today

READMEChangelogDependencies (6)Versions (8)Used By (0)

Easy Deployer
=============

[](#easy-deployer)

[![Packagist](https://camo.githubusercontent.com/c44c8c8398aa18fb4d7a205e04cab0897e0971ffaac44966cabda16d8354941c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7065727370696b617070732f6b6c69636b2d6465706c6f792e737667)](https://packagist.org/packages/perspikapps/klick-deploy)[![Packagist](https://camo.githubusercontent.com/c570843fe04f8333ca1f96b82bd1b31fa5a0d87b1dd21ac5e49526be3422d5e4/68747470733a2f2f706f7365722e707567782e6f72672f7065727370696b617070732f6b6c69636b2d6465706c6f792f642f746f74616c2e737667)](https://packagist.org/packages/perspikapps/klick-deploy)[![Packagist](https://camo.githubusercontent.com/05290990d157906a37104d22b12bb7ac479686de8a3b5c6750289b3729871ebf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7065727370696b617070732f6b6c69636b2d6465706c6f792e737667)](https://packagist.org/packages/perspikapps/klick-deploy)

[![Commitizen friendly](https://camo.githubusercontent.com/c287c27407d94c6772fe44d84ee2281971e70c36bf5a28dfe6f2c31f66ea096a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f6d6d6974697a656e2d667269656e646c792d627269676874677265656e2e737667)](http://commitizen.github.io/cz-cli/) [![semantic-release](https://camo.githubusercontent.com/5f3b57745af83409bc673dec57e3eb360e1ec53b37ac29f81a319e347fa351c6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2532302532302546302539462539332541362546302539462539412538302d73656d616e7469632d2d72656c656173652d6531303037392e737667)](https://github.com/semantic-release/semantic-release)

[![Buy me a coffee](https://camo.githubusercontent.com/cc27971f9ec7aa779971c58c826a6c67cda2b2ba0940c9bb010d44c3168a15a6/68747470733a2f2f62616467656e2e6e65742f62616467652f6275796d6561636f6666652f746f6d6772762f79656c6c6f773f69636f6e3d6275796d6561636f66666565)](https://buymeacoffee.com/tomgrv)

This package handles deployement configuration via a `deploy.yaml` file to define deploy strategy and a `.hostmap` file to define target strategy

Installation
------------

[](#installation)

Install via composer

```
composer require perspikapps/klick-deploy
```

Usage
-----

[](#usage)

Deployment is handled by [deployphp/deployer](https://github.com/deployphp/deployer) package.

### deploy.yaml

[](#deployyaml)

*See [deployer](https://github.com/deployphp/deployer) config for details*

```
import:
    - vendor/perspikapps/klick-deploy/src/strategy_laravel.php
    - vendor/perspikapps/klick-deploy/src/strategy_upload.php
    - vendor/perspikapps/klick-deploy/src/strategy_update.php
    - vendor/perspikapps/klick-deploy/src/strategy_shared.php
    - vendor/perspikapps/klick-deploy/src/strategy.php

config:
    source_path: './'
    shared_dirs:
        - storage
    shared_files:
        - .env
    writable_dirs:
        - bootstrap/cache
        - storage
        - storage/app
        - storage/app/public
        - storage/framework
        - storage/framework/cache
        - storage/framework/sessions
        - storage/framework/views
        - storage/logs
    log_files:
        - storage/logs/*.log

hosts:
    example.com:
        hostname: ssh.example.com
        labels:
            env: production
        secrets:
            APP_KEY: ENCRYPTED_APP_KEY
            DB_PASSWORD: ENCRYPTED_DB_PASSWORD
            MAIL_PASSWORD:
```

Host entries may define a `secrets` map. Each key is the environment variable name that should be written to the remote `.env` file.

Supported value formats are:

- `APP_KEY: %APP_KEY%` uses the current process environment variable `APP_KEY` without decryption.
- `APP_KEY: ENCRYPTED_APP_KEY` decrypts the inline value remotely with the `decrypt` helper.
- `APP_KEY: { secret: ENCRYPTED_APP_KEY, env: APP_KEY }` uses explicit encrypted value with optional env fallback when `secret` is empty.

This keeps secret values out of the repository while still letting each host declare exactly which secrets it needs.

### .hostname

[](#hostname)

Specify ONE deployement target per line as url:

- url scheme = strategies to activate (`+` separated, each must be loaded in `import` section of `deploy.yaml` file)
- url user/host/port = server to deploy to
- url path = path on server to deploy to
- url query = deploy options to use
- url anchor = variables to set in .env file after deployment

```
upload+laravel://user@dev.exemple.com/var/home/{{hostname}}?bin/php=/opt/plesk/php/7.4/bin/php&writable_mode=chmod#debug=true&env=staging
upload+laravel://user@beta.exemple.com/var/home/{{hostname}}?bin/php=/opt/plesk/php/7.4/bin/php&writable_mode=chmod#debug=true&env=beta
upload+laravel://user@www.exemple.com/var/home/{{hostname}}?bin/php=/opt/plesk/php/7.4/bin/php&writable_mode=chmod#debug=false&env=production
```

Features
--------

[](#features)

### Per-Branch Preview Deployments

[](#per-branch-preview-deployments)

Passing `--branch-scope=` to `dep deploy` (or the `branch-scope` input on the `actions/deploy`/`actions/run-deployer` GitHub Actions) derives an isolated alias, `deploy_path`, and database name for that branch, so concurrent branches deployed against the same host template never collide. This is wired up automatically once a pull request is ready for review: `.github/workflows/deploy.yml`'s `ready_for_review`/`synchronize` triggers pass the PR's head branch as the scope, so every PR gets its own preview subdomain (e.g. `taskadabra-alpha.perspikapps.fr` + branch `feature/foo-bar` → `taskadabra-alpha-feature-fo-c6c1d9.perspikapps.fr`) instead of sharing one "alpha" host.

Requirements: the host's `alias` must be a subdomain (e.g. `app-alpha.example.com`, not a bare root domain) so a sibling subdomain label can be derived.

Corresponding cleanup runs via `dep cpanel:teardown --branch-scope=` (the `actions/teardown` GitHub Action), triggered by `.github/workflows/deploy-teardown.yml` on `pull_request: closed`. It removes the subdomain, database + user, mail account, and deploy\_path directory for that branch. Teardown refuses to run without `--branch-scope`, so it can never be pointed at a real (non-preview) host, and tolerates resources that are already missing.

After a successful `dep deploy`, the `deploy:report_url` task prints the final `https://` URL for CI to pick up. `actions/run-deployer` exposes it as a `deploy-url` output (bubbled up through `actions/deploy`), and `.github/workflows/deploy.yml` uses it to create or update a PR comment (via the generic [`tomgrv/actions/create-pr-comment`](https://github.com/tomgrv/actions/tree/main/create-pr-comment) action, keyed per host) linking straight to the deployed preview — re-deploys of the same host update the same comment instead of piling up duplicates.

### Execution Plan Hash Verification

[](#execution-plan-hash-verification)

Before the deploy lock is acquired, `deploy:lock`'s `before` hook computes a SHA-256 hash of the exact ordered list of tasks Deployer's `ScriptManager` resolves for the `deploy` command (including `before`/`after` hooks) and compares it against an optional `deploy_plan_hash` value — settable globally under `deploy.yml`'s top-level `config:` block, or per host alongside `deploy_path`/`remote_user`:

```
config:
  deploy_plan_hash: '3f2a9c...' # sha256 of the resolved `deploy` task pipeline
```

- **Hash configured and mismatched**: the plan about to run, its computed hash, and the configured hash are logged, and the deploy aborts before locking — this catches the deploy task pipeline silently drifting from what was reviewed (a recipe or dependency update reordering/adding tasks).
- **Hash configured and matching**: the deploy proceeds normally.
- **No `deploy_plan_hash` configured**: the check is purely informative — it logs the computed hash and never blocks the deploy.

### GitHub Actions Manual Dispatch

[](#github-actions-manual-dispatch)

`deploy.yml` also accepts `workflow_dispatch` with `environment`, `branch-scope`, and `selector` inputs, so a deployment for an arbitrary branch can be triggered on demand (including via the MCP server's `trigger_deploy` tool — see below) without needing to push to `main`/`release/*` or request a PR review.

### MCP Server &amp; Skill

[](#mcp-server--skill)

`mcp/` ships a Model Context Protocol server (see [`mcp/README.md`](mcp/README.md)) so an AI agent can inspect `deploy.yml`, resolve which environment a branch maps to, preview what a per-branch preview deployment would be named, and — with a GitHub token — trigger and monitor a real deployment. A companion Claude Code skill (`klick-deploy`, in this monorepo at `.agents/skills/klick-deploy/SKILL.md`) documents how to use them together.

### PHP/Composer Setup via `tomgrv/actions`

[](#phpcomposer-setup-via-tomgrvactions)

`actions/run-deployer` (and `.github/workflows/deploy.yml`'s pre-build step) delegate PHP version/extension detection, `shivammathur/setup-php`, and `ramsey/composer-install` to [`tomgrv/actions/setup-php`](https://github.com/tomgrv/actions/tree/main/setup-php) rather than reimplementing that logic. `run-deployer` calls it unconditionally, so it never assumes the caller already prepared PHP — a package consumer can invoke `actions/deploy`/`actions/unlock`/`actions/teardown` directly with no setup step of their own.

### Automatic Crontab Setup

[](#automatic-crontab-setup)

The package automatically configures essential Laravel cron jobs during deployment:

- **Queue Restart**: `php artisan queue:restart` runs every hour to prevent memory leaks
- **Schedule Runner**: `php artisan schedule:run` runs every minute to execute Laravel's task scheduler

These cron jobs are automatically set up just before the deployment unlock phase and use the deployment path to ensure they point to the current release.

Security
--------

[](#security)

If you discover any security related issues, please email instead of using the issue tracker.

Credits
-------

[](#credits)

- [tomgrv](https://github.com/tomgrv)
- [deployphp](https://github.com/deployphp)

###  Health Score

34

—

LowBetter than 74% of packages

Maintenance64

Regular maintenance activity

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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

Unknown

Total

1

Last Release

1547d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2738d1530aa105abd4ef531339d50841bcd735fc600160dfed8943370d6e05bf?d=identicon)[tomgrv](/maintainers/tomgrv)

---

Top Contributors

[![persipkapps-klicksplit[bot]](https://avatars.githubusercontent.com/u/8452332?v=4)](https://github.com/persipkapps-klicksplit[bot] "persipkapps-klicksplit[bot] (1 commits)")

---

Tags

laraveldeploydeployer

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/perspikapps-php-easy-deployer/health.svg)

```
[![Health](https://phpackages.com/badges/perspikapps-php-easy-deployer/health.svg)](https://phpackages.com/packages/perspikapps-php-easy-deployer)
```

###  Alternatives

[ngmy/webloyer

Webloyer is a Web UI for managing Deployer deployments

2191.1k](/packages/ngmy-webloyer)[innocenzi/deployer-recipe-forge

Seamless zero-downtime deployment on Forge with Deployer

1916.7k](/packages/innocenzi-deployer-recipe-forge)

PHPackages © 2026

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