CDNShark Documentation

Web Hosting

← Back to Documentation

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

  1. Open the repository's gear icon in the Git tab.
  2. Tick Deploy when GitHub/GitLab is pushed and click Save settings.
  3. Reopen the gear icon and copy the Auto-deploy webhook URL.

2. Add it on GitHub

  1. Your repository → Settings → Webhooks → Add webhook.
  2. Payload URL: the webhook URL.
  3. Content type: application/json.
  4. Which events: "Just the push event".
  5. Click Add webhook. GitHub sends a test ping, which should show a green tick.

Or on GitLab

  1. Your project → Settings → Webhooks → Add new webhook.
  2. URL: the webhook URL. Leave the secret token empty.
  3. Trigger: Push events.
  4. 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.