| title | Deploying a GitHub Repository on Vertra Cloud |
|---|---|
| sidebarTitle | Deploy via GitHub |
| description | Create an application from a public or private GitHub repository and enable automatic deploy on every push to the branch you choose. |
| icon | github |
A Vertra Cloud application can be created from a public or private GitHub repository, and updated automatically on every push to the branch you choose. Creating from GitHub and automatic deploy on every push work on every plan.
In the dashboard, click **New Project** and choose **Import from GitHub**. Paste the repository URL (`https://github.com/owner/repository`) or use **choose from my repositories** to list your account's repositories. Private repositories require connecting your GitHub account, which installs the Vertra Cloud app on the repositories you authorize. The repository's default branch comes pre-selected. Pick another branch and the file tree and the imported code switch to it. From here the flow is the same as uploading a `.zip`: build, environment, network, review and deploy. See [First deploy](/how-to-host).To push a new version later, enable automatic deploy below or use vertra deploy in the
CLI.
With automatic deploy on, every push to the chosen branch publishes the new version: the platform
downloads the code from that commit and deploys it. Without a chosen branch, a push to main or
master deploys.
- On the application, open Settings → Deploy and go to Auto deploy.
- Choose the GitHub account and the repository.
- Choose the branch. The repository's default branch comes pre-selected. If the branch list can't be loaded, the webhook follows
mainormaster. - Click Enable auto deploy.
Vertra Cloud creates the webhook on the repository for you; nothing needs to be configured on
GitHub. The same section shows the current branch and lets you change it; linking again without a
branch goes back to main or master. To turn it off, use Disable. The webhook is also
removed when the application is deleted.
Automatic deploy can also be created, checked and removed via the
deploys API, with a key that has the
apps:write scope.