Deploy from Git

Point an app at a repository and let Deplo build and deploy it on every push.

The source most apps use. The agent clones the repository on the server that builds it.

GitHub AppGitLab, Bitbucket, Gitea (beta)Repository URL
Repository picker and branch listyesyesno, you paste the URL and type the branch
Deploy on pushyesyes, a webhook per repositoryno, use the deploy hook
Pull request previewsyesnono
Commands read before the first buildyesnoonly for a public github.com URL

Deploy one

Pick the source

On the Overview, open Add New, then Application, then the GitHub or Git tile.

The Git source step

Pick the repository and the branch. Nothing connected yet? Connect GitHub, then Personal account or Organization: Deplo creates the GitHub App, with nothing to copy, and you choose which repositories it sees. Use a repository URL switches to the Git tile.

Set up the app and deploy

The Set up the app card shows the App name, the framework, the Build command and the Deploy command.

  • A GitHub repository is read ahead. The build command comes from your package.json, the deploy command from the framework's convention, never your start script. Reset empties a command and lets the builder decide.
  • Any other repository shows Detected at build time: detection runs on the first build.

Advanced holds the server, variables, Root directory, build server, deploy trigger, submodules and watch paths. Leave Automatic deployments on unless you release by hand, then click Deploy.

New repositories on the Overview

Push a first commit to a new repository on a connected host: a dashed New repository detected card appears on the Overview, before your apps. Import lists them, and Import on one opens the wizard with that repository picked.

  • What: up to 3 repositories created in the last 7 days, with at least one commit, that no app of the team deploys yet.
  • When: Deplo checks each host at most every 5 minutes.
  • Where and who: the top level of the Overview only, for members who can both create and deploy apps for the whole team.
  • X, then Hide this repository: gone, in this browser only. Stop suggesting repositories: no more cards for you in this team. Turn them back on in Settings -> Git, Suggest new repositories.

A GitHub App installed on Only select repositories cannot see a new repository until you add it to the App's selection on GitHub.

Change the source later

Settings -> Deployments: the source of a running app

Settings -> Deployments, the Source card. Change the repository, the branch, the Root directory, or the source type itself. The app keeps its domains, variables and volumes.

Save source does not deploy. Click Redeploy when you are ready.

The rest lives nearby:

SettingWhere
Build methodThe Build card, below. See Build settings
Deploy trigger, Include submodules, Watch pathsThe Releases card, Trigger drawer. See Automatic deployments
ServerSettings -> General, Move. Shown only when you have more than one server

Good to know

  • A Dockerfile or a Compose file in the repository is used. That is what Automatic, the default build method, does. See Build methods.
  • A private repository needs a connection. Its credentials are reused by every app on that host. See Git providers.
  • Two apps can track two branches of the same repository. A normal way to run staging.
  • With a build server set, the clone happens there.

Troubleshooting

SymptomWhat to check
The picker says No repositories accessible to this App.Click Configure repository access on GitHub and add the repository.
Authentication failed in the clone stepThe stored token expired or was revoked. Settings -> Git, then Test connection.
Pushes do not deployOn the Source card, look for Deplo could not add the push webhook: it lists what the token is missing and the webhook address to add by hand.
The build and deploy commands are empty in the wizardThe repository is not on GitHub. Detection runs on the first build.

More in Deploys and builds.

Next steps

Did this page help you?

On this page