Skip to content

Latest commit

 

History

History
63 lines (52 loc) · 2.83 KB

deploy-github.mdx

File metadata and controls

63 lines (52 loc) · 2.83 KB
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.

Create the application from GitHub

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.

Enable automatic deploy

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.

  1. On the application, open Settings → Deploy and go to Auto deploy.
  2. Choose the GitHub account and the repository.
  3. Choose the branch. The repository's default branch comes pre-selected. If the branch list can't be loaded, the webhook follows main or master.
  4. 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.

Pushes to other branches are ignored. Webhooks created before branch selection existed keep following `main` and `master`. Each push counts toward the plan's [deploys-per-hour limit](/plans-and-limits#deploys-per-hour-limit); a push that arrives once the limit is exceeded is dropped and logged in the **Activity** tab.

Via the API

Automatic deploy can also be created, checked and removed via the deploys API, with a key that has the apps:write scope.