SpipCP
Deploys

Deploy from GitHub

Wire a GitHub (or GitLab / Gitea) push to an automatic, health-gated deploy in a few minutes — generate a deploy key, add the webhook, push.

This guide connects a push to your repository to an automatic deploy of your site, with the same cutover and rollback as a manual deploy. It uses GitHub; GitLab and Gitea work the same way (the signature header differs, noted below).

1. Connect the repository

On the site's Deploys tab:

  1. Paste the repository SSH URL (git@github.com:owner/repo.git) and the branch to track.
  2. Click Generate deploy key. Copy the public key shown.

2. Add the deploy key on GitHub

In the repo: Settings → Deploy keys → Add deploy key. Paste the public key, give it a title, leave Allow write access unchecked (deploys only read). Save.

A deploy key, not your account key

This key is scoped to this one repository and this one site. It cannot read your other repos, and it is not your personal SSH key. The private half stays encrypted in the panel.

3. Add the webhook

Back on the Deploys tab, click Enable webhook and copy the generated secret. Then in the repo: Settings → Webhooks → Add webhook:

  • Payload URLhttps://<your-panel>/api/v1/sites/<site-id>/webhook (shown on the tab).
  • Content typeapplication/json.
  • Secret — paste the secret from the panel.
  • EventsJust the push event.

GitHub signs each delivery with X-Hub-Signature-256. The panel verifies it against your secret; an unsigned or wrong-signature delivery is rejected (401) and logged. For Gitea the header is the same (X-Hub-Signature-256); for GitLab set a Secret token instead (sent as X-Gitlab-Token).

4. Push

git commit --allow-empty -m "trigger deploy" && git push

The push fires the webhook → the panel verifies it → a deploy runs (fetch → build → smoke → cutover). Watch it on the Deploys tab. A failed build never affects the running site; Roll back is one click.

Pushes during a deploy

Webhook deploys are serialized per site: if you push twice quickly, or push while a deploy is running, the panel queues exactly one follow-up — it never piles up, and the final state is always the latest commit.

Manual deploy

The Deploy now button on the tab runs the same pipeline without a push — handy for a first deploy or a re-run.

Test before you rely on it

Use Deploy now for a first deploy, then make a small push to confirm the webhook fires and the deploy runs end to end. Once you've seen one push-triggered deploy succeed, every later push works the same way.

On this page