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 repository is cloned by the agent on the server that builds it.

What you get depends on the provider:

GitHub AppGitLab, Bitbucket, Gitea (beta)A bare Git URL
Repository pickeryesyesno, you paste the URL
Branch listyesyesno, you type it
Deploy on pushyes, the App's own webhookyes, a webhook per repositoryno, use the deploy hook
Pull request previewsyesnono
Wizard prefillyesnono
Credentialshort-lived installation tokena personal access token you store oncethe URL, or a stored token

Deploy one

Start a new app

On the Overview, open Add new, then Application.

Pick the source

Pick the GitHub or Git tile.

The Git source step

If nothing is connected yet, click Connect GitHub. Deplo creates the GitHub App for you, with nothing to copy and paste. Choose which repositories it can see, then pick the repository and the branch.

Check what Deplo read

GitHub only. The last card is already filled in: App name, the framework, and the Build command from your package.json. The Deploy command follows the framework's convention, not your start script. Reset empties a command and lets the builder decide.

A repository from the Git tab is not read ahead of time. Detection runs on the first build.

Deploy

Leave Automatic deployments on unless you want to release by hand. Click Deploy.

Change the source later

Settings -> Deployment: repository, branch and root directory of a running app

Settings -> Deployments, the Deploy Source card. You can change the repository, the branch and even the source type. The app keeps its domains, variables and volumes.

Prop

Type

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

Private repositories

Credentials live on the connection, and every app using that host reuses them. See Git providers.

Good to know

  • Only a GitHub App can have pull request previews.
  • A bare Git URL cannot register a webhook. Use the deploy hook instead.
  • Watch paths fail open. A push with no file list, like some tag pushes, always deploys.
  • Two apps can track two branches of the same repository. A normal way to run staging.
  • Changing the repository does not clear the volumes.
  • With a build server set, the clone happens there.

Troubleshooting

SymptomWhat to check
The repository picker is emptyThe GitHub App cannot see it. Use Manage connected apps and grant the repository on GitHub.
Authentication failed in the clone stepThe stored token expired or was revoked. Settings -> Git, then Test connection.
Pushes do not deployFor a non-GitHub connection, check the webhook status on Settings -> Deployments.
The wizard's last card is emptyThat is a Git-tab repository. Detection runs on the first build.

More in Deploys and builds.

Next steps

Did this page help you?

On this page