Skip to content

Sites

Deployments

Zero-downtime Git deploys, hooks, the test gate, health checks and rollback.

๐Ÿš€ How a deploy works

Every deploy builds a new release next to the running one and switches to it in a single step. Visitors never see a half-deployed site, and the previous release stays on disk for an instant rollback.

The steps, in order:

Step What happens
Pre-deploy hook Your script, if set. A failure stops the deploy.
1. Clone A shallow clone of the branch (or the exact ref you chose) into releases/<YYYYMMDDHHMMSS>.
2. Shared files storage/ and .env in the release are linked to shared/, so they survive deploys.
3. Composer composer install --no-dev --prefer-dist --optimize-autoloader, with the site's own PHP version (Laravel, and WordPress with a composer.json).
Tests If the test gate is on.
4. Front-end build If package.json has a build script: install with pnpm, Yarn or npm (whichever lock file you use), run build, then remove node_modules.
5. Caches Laravel: config:cache, route:cache, view:cache.
6. Migrations Laravel: php artisan migrate --force.
7. Switch current is pointed at the new release atomically; PHP-FPM is reloaded to clear OPcache.
8. Finish Laravel: queue:restart. The 5 newest releases are kept, older ones removed. Then the post-deploy hook.
Health check If enabled โ€” see below.

The live log streams while the deploy runs (View log). If the panel restarts in the middle of a deploy, that deploy is marked failed and the site keeps serving the previous release.

Important. Laravel and WordPress sites need a filled-in shared/.env before the first deploy (database credentials, APP_KEY โ€ฆ). 1-click installs write it for you; otherwise use the .env Editor.

โš™๏ธ Deploy settings

Deploy Settings holds the repository and everything about how the site is deployed:

  • Repository URL โ€” https://โ€ฆ or git@host:owner/repo, and the branch (the list is read from the repository).
  • Git Access Token (for private repos) โ€” a personal access token from GitHub or your Git host. It is stored encrypted, never shown again, sent to Git in a request header (never in the URL) and masked as *** in logs.

โ–ถ๏ธ Starting a deploy

  • Deploy in the site header.
  • Review changes shows the commits that are not live yet, with an optional Deploy a specific ref (a tag, branch or commit).
  • โ†บ Redeploy on a past deployment re-runs the current branch.
  • Deploy Now / Deploy without tests in Deploy Settings โ†’ Manual Deploy.
  • The bulk Deploy action on the Sites list.
  • A push to GitHub, the REST API, the Telegram bot or the MCP server.

Only one deploy runs per site at a time. A second deploy requested in the meantime is queued and starts when the first finishes (one queued deploy per site).

A deploy that runs longer than 25 minutes (DEPLOY_TIMEOUT_MS) is stopped and marked failed; after 10 minutes the panel already shows a may be stuck warning. Admins can Cancel a running deploy.

๐Ÿช Hooks

Deploy Settings โ†’ Deploy Hooks has two shell scripts (up to 4,096 characters each):

  • Pre-deploy hook โ€” runs before the clone.
  • Post-deploy hook โ€” runs in the new release directory, after the switch.

They run with bash and set -euo pipefail: a failing command fails the deploy.

Terminal
# Post-deploy hook example
php artisan horizon:terminate
php artisan sitemap:generate

๐Ÿงช The test gate

Tests (pre-deploy gate) runs your test suite on the new release before it goes live:

Setting Default
Run tests during deploy Off
Test command php artisan test
On failure Block deploy (the live site stays unchanged) or Warn only (deploy anyway)
Timeout (seconds) 300
Run against isolated in-memory SQLite On โ€” tests never touch the production database

Dev dependencies are installed for the tests and removed again afterwards. The Test results card shows the pass rate, durations and the pass/fail trend of the last 30 runs. Deploy without tests skips the gate once.

๐Ÿฉบ Health check and automatic rollback

With Enable health check after deploy on, the panel requests the Health check URL (by default the site's home page) after the switch: up to 3 attempts, 5 seconds apart, 15 seconds each. Any response below 500 passes.

If every attempt fails, the panel switches current back to the previous release, marks the deploy as failed and notifies you. The bad release stays on disk so you can inspect it.

โช Rollback

Deployments โ†’ Releases on disk lists the kept releases. Rollback next to a release switches current to it immediately and restarts the queue workers. It is recorded in the deploy history like a deploy.

๐Ÿช Push-to-deploy

Deploy Settings โ†’ GitHub Auto-Deploy Webhook โ†’ Generate token gives you a webhook URL:

Text
https://panel.example.com/api/webhooks/github/<token>

In GitHub, add it under Settings โ†’ Webhooks with content type application/json, and use the same token as the secret. The panel:

  • verifies GitHub's X-Hub-Signature-256 signature;
  • deploys only on a push to the site's configured branch (other branches and events are ignored, and ping is answered);
  • ignores repeated deliveries;
  • skips the push if a deploy is already running.

See Webhooks for the details.

๐ŸŽ›๏ธ Presets

A preset is a saved set of deploy settings โ€” hooks, health check (the URL may use {{domain}}), test gate settings, tags and uptime monitoring โ€” that you can apply to new or existing sites. Admins manage them in Settings โ†’ Presets; admins and developers can apply them.

๐Ÿ”” Notifications

Each deploy sends a notification โ€” succeeded or FAILED โ€” with the branch, commit and message, author, duration and test results to your notification channels, the bell in the panel, and the deploy.succeeded / deploy.failed automation events. A failed deploy can be diagnosed in plain language by the AI assistant.