Skip to main content
Apps connected to GitHub already deploy on every push to their branch. Use the API when you want to deploy from CI after your own tests pass, or for apps that are not connected to GitHub.
If your app is connected to GitHub and you deploy from CI, turn off Automatic deploys in the app’s settings so each push does not deploy twice.

1. Create a deploy key

In the dashboard, open API and create a key with the scopes apps:read and apps:deploy, limited to the one application. Save it as a CI secret named SERVBASE_API_KEY, and the app’s ID as SERVBASE_APP_ID.

2. Add the deploy script

The script starts a deployment, waits until it finishes, prints the build log, and exits with an error if the build failed.
scripts/servbase-deploy.sh

3. Run it in your pipeline

.github/workflows/deploy.yml

Common responses