Git Deployments
ServerPlane lets you connect a GitHub repository to any app and deploy code directly from a branch. Each deployment pulls the latest code, runs your build and deploy commands, and restarts the app automatically.
Prerequisites
- Your GitHub account must be connected for repo access. See Connecting Your GitHub Account.
- The app must already be created and deployed on a server.
Connecting a Repository to an App
- Open your app's detail page and go to the Git & Deploy tab.
- Click Browse Repos to load your repositories. You can also type in the search box and press Enter to filter by name.
- Click a repository from the list to select it. Both public and private repos are supported. Private repos are labeled with a badge.
- After selecting a repo, the branch dropdown appears. ServerPlane auto-selects
mainormasterif either exists. Choose a different branch if needed. - Click Connect Repository.
When you connect, ServerPlane automatically:
- Generates a deploy key and adds it to your GitHub repository (read-only). This allows the server to pull code without needing your personal credentials.
- Registers a webhook on the repository for push events (used for auto-deploy, covered in Auto-Deploy & Webhooks).
- Enables auto-deploy by default.
Once connected, the tab shows the connected repo name, branch, and a green "Connected" badge.
Build & Deploy Commands
After connecting a repo, scroll down to the Build & Deploy Commands section:
- Build Command — Runs after code is pulled. Example:
npm install && npm run build. Leave empty to skip. - Deploy Command — Runs after the build step. Example:
php artisan migrate —force. Leave empty to skip.
Click Save Settings to persist your commands. The app restarts automatically after the deploy command completes.
Triggering a Manual Deploy
- In the Git & Deploy tab, find the Deploy section at the top.
- Click Deploy Now.
- Confirm the dialog. A deployment job is queued immediately.
- Switch to the Deployments tab to monitor progress.
Manual deployments pull the latest commit from the configured branch.
Disconnecting a Repository
- In the Git & Deploy tab, click the Disconnect link in the top-right corner of the repository card.
- Confirm the dialog.
Disconnecting removes the deploy key and webhook from GitHub and clears all Git configuration (repo URL, branch, build/deploy commands, auto-deploy setting) from the app. The deployed code on the server is not removed.