PHPackages                             sage-grids/laravel-continuous-delivery - 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. sage-grids/laravel-continuous-delivery

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

sage-grids/laravel-continuous-delivery
======================================

Multi-environment continuous delivery for Laravel with GitHub webhooks, Envoy deployment, and human approval workflows.

v0.1.6(2mo ago)0217MITPHPPHP ^8.2CI failing

Since Jan 28Pushed 2mo agoCompare

[ Source](https://github.com/sage-grids/laravel-continuous-delivery)[ Packagist](https://packagist.org/packages/sage-grids/laravel-continuous-delivery)[ RSS](/packages/sage-grids-laravel-continuous-delivery/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (14)Versions (9)Used By (0)

sage-grids/laravel-continuous-delivery
======================================

[](#sage-gridslaravel-continuous-delivery)

Multi-app continuous delivery for Laravel with GitHub webhooks, Laravel Envoy deployment, and human approval workflows.

Features
--------

[](#features)

- **Multi-App Support** - Deploy multiple applications from a single installation
- **Deployment Strategies** - Simple (git pull) or Advanced (releases + symlinks)
- **GitHub Webhooks** - Trigger deployments from push and release events
- **Human Approval** - Production deployments require approval via Telegram/Slack/CLI
- **Laravel Envoy** - Blade-syntax deployment scripts with built-in notifications
- **Isolated Storage** - Deployment history survives database refreshes
- **Rollback Support** - Revert to previous releases with a single command

---

How It Works
------------

[](#how-it-works)

### Staging Pipeline (Automatic)

[](#staging-pipeline-automatic)

```
Push to develop → Webhook → Auto-deploy → Notify

```

### Production Pipeline (Approval Required)

[](#production-pipeline-approval-required)

```
Create release → Webhook → Approval request → Approve → Deploy → Notify

```

---

Quick Start
-----------

[](#quick-start)

### 1. Install

[](#1-install)

```
composer require sage-grids/laravel-continuous-delivery
php artisan vendor:publish --tag=continuous-delivery
php artisan deployer:migrate
```

### 2. Configure

[](#2-configure)

Edit `config/continuous-delivery.php`:

```
'apps' => [
    'default' => [
        'name' => 'My App',
        'repository' => 'owner/repo',
        'path' => '/var/www/my-app',
        'strategy' => 'simple', // or 'advanced'

        // Strategy-specific settings
        'advanced' => [
            'keep_releases' => 5,
        ],

        'triggers' => [
            [
                'name' => 'staging',
                'on' => 'push',
                'branch' => 'develop',
                'auto_deploy' => true,
            ],
            [
                'name' => 'production',
                'on' => 'release',
                'tag_pattern' => '/^v\d+\.\d+\.\d+$/',
                'auto_deploy' => false,
                'approval_timeout' => 2,
            ],
        ],
    ],
],
```

Add to `.env`:

```
GITHUB_WEBHOOK_SECRET=your-secret-here

# Notifications
CD_TELEGRAM_ENABLED=true
CD_TELEGRAM_BOT_TOKEN=your-bot-token
CD_TELEGRAM_CHAT_ID=your-chat-id
```

### 3. Set Up Server

[](#3-set-up-server)

```
# Create isolated database directory
sudo mkdir -p /var/lib/sage-grids-cd
sudo chown www-data:www-data /var/lib/sage-grids-cd
```

### 4. Configure GitHub Webhook

[](#4-configure-github-webhook)

Go to **Repository Settings → Webhooks → Add webhook**:

- **Payload URL**: `https://your-app.com/api/deploy/github`
- **Content type**: `application/json`
- **Secret**: Same as `GITHUB_WEBHOOK_SECRET`
- **Events**: Push events and Releases

### 5. Start Queue Worker

[](#5-start-queue-worker)

```
php artisan queue:work
```

---

Deployment Strategies
---------------------

[](#deployment-strategies)

### Simple Strategy

[](#simple-strategy)

Git-based in-place deployment:

```
git pull → composer install → migrate → cache:clear

```

Best for: Development, staging, simple applications.

### Advanced Strategy

[](#advanced-strategy)

Release-based deployment with symlinks:

```
releases/
  20240115120000/   # Old release
  20240116140000/   # Current release
shared/
  storage/
  .env
current -> releases/20240116140000

```

Best for: Production, zero-downtime deployments, easy rollbacks.

---

CLI Commands
------------

[](#cli-commands)

```
# App management
php artisan deployer:apps                    # List configured apps
php artisan deployer:setup default           # Set up app directories
php artisan deployer:releases default        # List releases (advanced)

# Triggering deployments
php artisan deployer:trigger default staging # Trigger staging deploy
php artisan deployer:trigger default production --ref=v1.2.3

# Approval workflow
php artisan deployer:pending                 # List pending approvals
php artisan deployer:approve abc123          # Approve by UUID
php artisan deployer:reject abc123           # Reject by UUID

# Status and management
php artisan deployer:status                  # Recent deployments
php artisan deployer:status abc123           # Single deployment
php artisan deployer:rollback default        # Rollback to previous

# Maintenance
php artisan deployer:expire                  # Expire pending approvals
php artisan deployer:cleanup --days=90       # Clean old records
```

---

Approval Workflow
-----------------

[](#approval-workflow)

When a production release is created, you'll receive a notification:

```
🚀 Production Deploy Request

App: My App
Trigger: production:v1.2.3
Commit: abc1234

[✅ Approve] [❌ Reject]

⏰ Expires in 2 hours

```

### Approval Methods

[](#approval-methods)

**1. Click notification links** - Telegram/Slack buttons

**2. CLI commands:**

```
php artisan deployer:pending           # List pending
php artisan deployer:approve abc123    # Approve
php artisan deployer:reject abc123     # Reject
php artisan deployer:status abc123     # Check status
```

---

Multi-App Configuration
-----------------------

[](#multi-app-configuration)

Deploy multiple applications:

```
'apps' => [
    'api' => [
        'name' => 'API Server',
        'repository' => 'company/api',
        'path' => '/var/www/api',
        'strategy' => 'advanced',
        'triggers' => [
            ['name' => 'staging', 'on' => 'push', 'branch' => 'develop'],
            ['name' => 'production', 'on' => 'release', 'auto_deploy' => false],
        ],
    ],
    'web' => [
        'name' => 'Web Frontend',
        'repository' => 'company/web',
        'path' => '/var/www/web',
        'strategy' => 'simple',
        'triggers' => [
            ['name' => 'staging', 'on' => 'push', 'branch' => 'main'],
        ],
    ],
],
```

---

API Endpoints
-------------

[](#api-endpoints)

MethodEndpointDescriptionPOST`/api/deploy/github`GitHub webhook receiverGET`/api/deploy/status/{uuid}`Check deployment statusGET`/api/deploy/approve/{token}`Approve deploymentGET`/api/deploy/reject/{token}`Reject deploymentGET`/api/deploy/health`Health check endpoint---

Documentation
-------------

[](#documentation)

- [Configuration Reference](docs/configuration.md)
- [Notifications Setup](docs/notifications.md)
- [Approval Workflow](docs/approval-workflow.md)
- [Server Setup Guide](docs/server-setup.md)

---

Security
--------

[](#security)

- Webhook signatures verified using HMAC-SHA256
- Approval tokens are 64 random characters with hash storage
- Tokens expire after configurable timeout
- All actions logged with approver identity
- Isolated database prevents data loss on db refresh

---

Troubleshooting
---------------

[](#troubleshooting)

### Webhook Not Triggering

[](#webhook-not-triggering)

1. Check GitHub webhook delivery logs
2. Verify `GITHUB_WEBHOOK_SECRET` matches
3. Check Laravel logs: `storage/logs/laravel.log`

### Deployment Stuck

[](#deployment-stuck)

```
php artisan deployer:pending      # Check pending deployments
php artisan deployer:expire       # Expire old ones
php artisan queue:failed          # Check failed jobs
```

### Notifications Not Sending

[](#notifications-not-sending)

1. Verify bot ID and chat ID are correct
2. Check if notification packages are installed
3. Test with `php artisan tinker`

---

Requirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 10, 11, or 12
- Queue driver (Redis, database, etc.)

---

License
-------

[](#license)

MIT

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance86

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

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 ~5 days

Total

7

Last Release

73d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ee28fe9d54e1c97a6001a5bb443136e0627e84956b9f1e961a3ccedcf24af758?d=identicon)[iserter](/maintainers/iserter)

---

Top Contributors

[![iSerter](https://avatars.githubusercontent.com/u/1284841?v=4)](https://github.com/iSerter "iSerter (27 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sage-grids-laravel-continuous-delivery/health.svg)

```
[![Health](https://phpackages.com/badges/sage-grids-laravel-continuous-delivery/health.svg)](https://phpackages.com/packages/sage-grids-laravel-continuous-delivery)
```

###  Alternatives

[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[bref/laravel-bridge

An advanced Laravel integration for Bref, including Octane support.

3384.1M11](/packages/bref-laravel-bridge)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)[yadahan/laravel-authentication-log

Laravel Authentication Log provides authentication logger and notification for Laravel.

416632.8k5](/packages/yadahan-laravel-authentication-log)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)[spatie/laravel-backup-server

Backup multiple applications

17016.7k1](/packages/spatie-laravel-backup-server)

PHPackages © 2026

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