Auto-Deploy on Every Push
For a repository cloned from GitHub or GitLab, a webhook makes every push to your deploy branch go live automatically, with no need to click Pull & Deploy.
1. Turn it on
- Open the repository's gear icon in the Git tab.
- Tick Deploy when GitHub/GitLab is pushed and click Save settings.
- Reopen the gear icon and copy the Auto-deploy webhook URL.
2. Add it on GitHub
- Your repository → Settings → Webhooks → Add webhook.
- Payload URL: the webhook URL.
- Content type:
application/json. - Which events: "Just the push event".
- Click Add webhook. GitHub sends a test ping, which should show a green tick.
Or on GitLab
- Your project → Settings → Webhooks → Add new webhook.
- URL: the webhook URL. Leave the secret token empty.
- Trigger: Push events.
- Save, then use Test → Push events to try it.
Good to know
- Pushes to other branches are ignored.
- Several pushes in quick succession are combined into one deploy of the newest commit.
- The URL itself is the password. Keep it private. If it leaks, click New URL and update the webhook; the old URL stops working.
- Bitbucket, Gitea and others work too: any service that can POST to a URL on push.