Git Deploy¶
The Git Deploy extension deploys websites automatically from a Git repository (GitHub, GitLab, or a self-hosted Gitea instance) — via git pull, with webhook auto-deploy on every push, signature verification, pre-deploy commands, and one-click rollback to any previous commit. It's installed as an opt-in extension via the marketplace.
Installation & enabling¶
- Enable the extension (marketplace) — the agent ensures
gitandrsyncare present on the affected servers. - Package permission — in the package, the admin sets Allow Git Deploy (
perm_git_deploy) to control whether a customer can deploy their own websites from external Git repositories — manually or automatically via webhook.
Connecting a repository¶
- On the Git Deploy page, add a repository: provider (GitHub/GitLab/Gitea), repository URL, branch, and target website.
- For private repositories, a deploy key is used that only has read access to that specific repository.
- Optionally set pre-deploy commands (e.g.
composer install,npm run build) — they run automatically before every deployment.
Deploying¶
- Manual — click Deploy in the repository overview.
- Automatic via webhook — the page shows the webhook URL and a secret to configure in the provider (GitHub/GitLab/Gitea). Incoming webhooks are verified via HMAC signature; only pushes to the configured branch trigger a deployment, all others are ignored.
Every deployment is logged: commit, timestamp, status and the full log output are available under History. A failed deployment aborts without changing the currently running live site.
Rollback¶
From the deployment history, roll back to any previous commit with one click — regardless of how many deployments have run since.
Security model¶
- Deployments run as the website's own Linux user — no root privileges needed.
- Each site has its own webhook secret.
- The deploy key for private repositories is read-only at the repository level.
- The runtime dependencies (
git,rsync) are only installed on servers where the extension is enabled.
Not yet included¶
- Multi-branch deployments (e.g. automatic staging per feature branch).
- Build containers — pre-deploy commands run directly as the site user, not in an isolated build environment.