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
- Go to Settings → Git Accounts in the dashboard.
- Click Connect GitHub Account (or GitLab / Bitbucket).
- 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
- Open the site detail → Settings tab.
- The Git section shows your connected accounts. Select the account containing your repository.
- Choose the repository from the dropdown.
- Choose the branch to deploy (CloudAIPilot suggests
mainorproductionbased on your site environment). - Optionally configure build settings (install command, build command, restart command, pre/post-deploy hooks).
- 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:
- CloudAIPilot receives the push notification from your git provider.
- A deployment plan is created and queued immediately.
- The server pulls the latest code, runs any install/build commands, and runs post-deploy hooks.
- Progress is visible in the Activity Center.
Manual Deploy Trigger
To deploy without a git push:
- Open the site detail → Deployments tab.
- 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
| Issue | Likely cause | Fix |
|---|---|---|
| Git section is missing on site | Site app type is WordPress | WordPress sites do not support git deploy. |
| No git accounts shown | No git account connected yet | Go to Settings → Git Accounts and connect your GitHub/GitLab/Bitbucket account. |
| Deployment triggered but build fails | Wrong install or build command | Check the build settings in Settings → Git section. Verify the commands work in your local repo. |
| Push doesn't trigger deployment | Wrong branch configured | Verify the branch name in Settings matches the branch you pushed to. |