How to Enable Auto-Deploy on DigitalOcean App Platform

intermediate 8 min read Updated 2026-03-24
Quick Answer

Enable auto-deploy during app creation by checking the toggle after selecting your GitHub repo and branch, or toggle it in existing app settings under Actions or source config. Test by pushing code to the linked branch (default: main) and monitor in Activity/Deployments. Use do-app.yaml with deploy_on_push: true for CLI control.

Get DigitalOcean App PlatformPartner

Prerequisites

  • DigitalOcean account with billing enabled
  • GitHub repository with app source code
  • DigitalOcean GitHub App installed with repo access
  • App code binding to 0.0.0.0:$PORT (default 8080)

Step-by-Step Instructions

1

Log in and Start App Creation

Log in to the DigitalOcean Cloud Control Panel and navigate to Create > Apps to open the Create App page. Under Create Resources from Source Code, select GitHub, connect your account, and choose the repository.[1][3]
2

Configure Source Directory

In the Source Directory field, enter the path to your app code (default: / for root). Ensure your app listens on 0.0.0.0:$PORT or process.env.PORT || 8080 (Node.js example).[1][3][6]
For monorepos, specify the subfolder containing your app.
3

Enable Auto-Deploy Toggle

Locate the Auto-Deploy checkbox or toggle in the deployment configuration section (under source or resources) and select/check it. This triggers redeploys on pushes to the selected branch (default: main or master).[1][5][6]
4

Set Resources and Environment

Configure resources like instance size (default: Basic 0.25 vCPU/512MB RAM), add environment variables if needed (e.g., for databases), and click Next. App Platform auto-generates DATABASE_URL for managed DBs.[1][6]
Use Worker service type for non-HTTP apps like bots.
5

Review and Create App

On the Review page, verify app name, billing, region (default: closest), and click Create Resource. Deployment takes 2-5 minutes; track in Build Logs.[1][4]
6

Verify Auto-Deploy Status

Once deployed, check the app's Overview page: Auto-deploy status shows as enabled, linked to your repo branch. Test by running git push origin main and monitor Activity or Deployments tab.[1][5][6]
Push a small change to confirm auto-trigger.
7

Enable on Existing App

For existing apps, go to Apps, select your app, open Overview or Settings. Click Actions (three dots), find Automatically Deploy Code Changes checkbox under deployment/source settings, check it, and save.[5][6]
8

Use App Spec YAML (CLI Method)

name: your-app-name
services:
- name: web-service
  source_dir: /
  github:
    repo: owner/repo
    branch: main
  deploy_on_push: true
Create/edit do-app.yaml in repo root with this syntax, commit, and push to enable programmatically.[2]
Reference official app spec docs for full options.

Common Issues & Troubleshooting

ContainerHealthChecksFailed

App fails HTTP health checks (e.g., Discord bot as web service). Switch service type to Worker, ensure port binding to 0.0.0.0:$PORT, check Build/Deploy Logs.[1][6]

Deployment not triggering on push

Verify GitHub App permissions, correct branch (main), and auto-deploy toggle enabled. Check Activity tab for errors.[5][6]

Build fails due to rate limits or Dockerfile issues

Use Linux AMD64-compatible Dockerfile, avoid restricted DB connections. Redeploy after fixes and monitor logs.[6][7]

Port misconfiguration

Bind explicitly to app.listen(process.env.PORT || 8080, '0.0.0.0'). Defaults to 8080; confirm in run command.[3][6]

Auto-deploy on wrong commits

Set specific branch in app settings or do-app.yaml. Use deploy_on_push: false for manual control if needed.[2]

Prices mentioned in this guide are pulled from current plan data and may change. Always verify on the official DigitalOcean App Platform website before purchasing.
Special Offer

Affiliate link. We may earn a commission at no extra cost to you.