How to Deploy App from GitHub on DigitalOcean App Platform

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

Link your GitHub repo via DigitalOcean control panel, select branch and source directory, configure resources and env vars, then enable autodeploy for automatic deployments on git pushes. App Platform auto-detects app types like static sites, Node.js, or Docker. Common issues like permissions or build failures resolve via logs and .do/app.yaml.

Get DigitalOcean App PlatformPartner

Prerequisites

  • DigitalOcean account with billing enabled
  • GitHub account with app source code repository
  • GitHub permissions granted to DigitalOcean (auto on first deploy)
  • Optional: .do/app.yaml for custom configs
  • Environment variables for APIs/databases

Step-by-Step Instructions

1

Log in to DigitalOcean Dashboard

Navigate to cloud.digitalocean.com and sign in to your DigitalOcean account. Ensure billing is set up since App Platform uses usage-based pricing with free tier limits for basic apps. Default region is NYC1.
2

Navigate to Apps Section

In the left sidebar under Platform, click Apps to open the Apps page showing any existing apps you have deployed.
3

Initiate App Creation

Click the green Create App button at the top-right to launch the Create an app wizard that guides you through deployment.
4

Connect GitHub Provider

Select GitHub as the Git provider. If not connected, click Connect GitHub and authorize DigitalOcean for read-only access to your repositories. Click Next to proceed.
This grants App Platform permissions automatically on first deploy.
5

Select Repository and Branch

Choose your repo from the Repository dropdown (e.g., yourusername/my-app). Set Branch to main or master. For monorepos, specify Source Directory like frontend/. App Platform auto-detects app type from files like package.json or Dockerfile. Click Next.
Use root <code>/</code> for single-project repos.
6

Configure Resources

Review auto-generated components like Web Service or Static Site. Adjust Instance size (default: Basic 0.25 vCPU, 512 MiB RAM ~$5/month). Set Region and add Environment Variables (e.g., NODE_ENV=production). Click Next for detection checks.
Use Professional tier for production workloads.
7

Review and Edit App Spec

Edit App Name (auto-generated like sea-lion-app-l8cvv, must be unique). Choose Project (default or new). Keep Autodeploy enabled for git push deployments. Configure HTTP port (e.g., 8080) or Run Command like npm start. Click Next for review.
Use <code>.do/app.yaml</code> in repo for advanced custom specs.
8

Final Review and Create

On the Review page, verify app details, billing, location, and resources. Click Create Resource to start deployment, which takes 5-15 minutes. View your live app URL on the Overview page once complete.
Monitor progress in <strong>Activity > Logs</strong> tab.
9

Enable GitHub Actions (Advanced)

For CI/CD, add DigitalOcean PAT as GitHub secret DIGITALOCEAN_ACCESS_TOKEN. Use
name: Update App
on:
  push:
    branches: [main]
jobs:
  deploy-app:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: digitalocean/app_action/deploy@v2
        with:
          token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
in .github/workflows/deploy.yml.
Initial control panel auth required once.

Common Issues & Troubleshooting

GitHub permissions error: 'Repository not accessible'

Reconnect GitHub in Apps page or re-authorize DigitalOcean access; ensure repo visibility matches account permissions.

Build failure: 'Module not found' or missing dependencies

Add required environment variables in Resources step; check Activity > Logs for exact errors and add package.json dependencies.

Database/API connection failed

Set env vars like DATABASE_URL in app config; verify credentials in DigitalOcean databases.

Deployment stuck or spec misconfiguration

Add .do/app.yaml to repo root for custom build/run commands; review auto-generated spec in wizard.

Autodeploy not triggering on git push

Confirm branch matches selected one; toggle Autodeploy in app settings; check GitHub-DO integration status.

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.
Try Free

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