Git Settings and Webhook Deploy

Who this is for

Users who want to deploy their site automatically when they push code to GitHub, GitLab, or Bitbucket.


Prerequisites

  • Site already created in CloudAIPilot — app type must not be WordPress (WordPress does not support git deploy).
  • A GitHub, GitLab, or Bitbucket account connected in Organization Settings → Git Accounts.

Overview

CloudAIPilot uses OAuth to connect your git account. Once connected, you select a repository and branch from a dropdown — no manual webhook URL or SSH deploy key configuration is needed.


Step 1: Connect Your Git Account

  1. Go to Settings → Git Accounts in the dashboard.
  2. Click Connect GitHub Account (or GitLab / Bitbucket).
  3. Complete the OAuth authorization. CloudAIPilot stores the access token for your account.

This step is done once per git provider — the same connected account works across all sites in your organization.


Step 2: Link a Repository to the Site

  1. Open the site detail → Settings tab.
  2. The Git section shows your connected accounts. Select the account containing your repository.
  3. Choose the repository from the dropdown.
  4. Choose the branch to deploy (CloudAIPilot suggests main or production based on your site environment).
  5. Optionally configure build settings (install command, build command, restart command, pre/post-deploy hooks).
  6. Click Link Repository.

How Auto-Deploy Works

Once a repository is linked, every push to the configured branch triggers a deployment plan on the server:

  1. CloudAIPilot receives the push notification from your git provider.
  2. A deployment plan is created and queued immediately.
  3. The server pulls the latest code, runs any install/build commands, and runs post-deploy hooks.
  4. Progress is visible in the Activity Center.

Manual Deploy Trigger

To deploy without a git push:

  1. Open the site detail → Deployments tab.
  2. Click Deploy Now to trigger a deployment of the current linked branch.

Build and Deploy Settings

After linking, you can configure additional build steps in the Settings tab under the Git section:

  • Install command — e.g., npm ci
  • Build command — e.g., npm run build
  • Restart command — e.g., pm2 reload ecosystem.config.js
  • Pre-deploy hook — runs before the new code is pulled
  • Post-deploy hook — runs after deploy completes

What Success Looks Like

Pushing to the configured branch creates a deployment visible in the Activity Center and the Deployments tab. The plan completes successfully and the live site shows the changes.


Common Issues and Fixes

IssueLikely causeFix
Git section is missing on siteSite app type is WordPressWordPress sites do not support git deploy.
No git accounts shownNo git account connected yetGo to Settings → Git Accounts and connect your GitHub/GitLab/Bitbucket account.
Deployment triggered but build failsWrong install or build commandCheck the build settings in Settings → Git section. Verify the commands work in your local repo.
Push doesn't trigger deploymentWrong branch configuredVerify the branch name in Settings matches the branch you pushed to.

Related Articles