Projects and services
Deploy from GitHub
Install the Cahaves GitHub App, choose a repository and branch, and build it.
Updated
Cloud reads your repositories through the Cahaves GitHub App. You install the App on a GitHub account or organization, choose which of its repositories it may read, and then create services that each follow one branch of one repository. GitHub is the only Git provider the console offers.
Cloud stores no GitHub token. At every deploy it asks GitHub for a token that can only read the one repository the service builds from, and that token expires after about an hour. That is why a private repository needs no deploy key of its own.
Connect GitHub
Open Git providers
Open Settings, then Git providers. Under Source control, the GitHub row reads "Connect GitHub to deploy repositories through the Cahaves GitHub App." Press Connect. Once one account is connected the same button reads Add account, and it connects another account or organization.
Install the App on GitHub
GitHub opens its own install page. Choose the account or organization, then choose which repositories the App may read: all of them, or only the ones you select. Cloud can build only what you allow here.
Come back to Cloud
GitHub sends you back to Git providers, where the connection is listed with the account's picture, its login (a link to its GitHub profile), a chip reading Personal account or Organization, and a line reading "Connected" with the date and "Installation" with its number.
The connection is yours rather than one of your Cloud organizations', so its repositories can be built in any of them. Organization on its chip is GitHub's kind of account, not a Cloud organization.
Finish the install within 15 minutes of pressing Connect, in the same browser where you are signed in to Cloud. The link Cloud sends you to GitHub with expires after 15 minutes, and it belongs to the Cloud account that pressed the button.
When GitHub sends you back, Cloud asks GitHub whether the GitHub user who finished the install can see that installation, and connects it only then. An installation id typed or pasted into the address connects nothing. When any of these checks fails, the page shows:
GitHub did not finish connecting. Start the install again from here.Nothing was connected. Press Connect again. GitHub will not connect lists the usual causes.
Give the App access to another repository
Repository access is GitHub's setting, not Cloud's: change it in the App's configuration on GitHub. Connecting the same installation again from Cloud updates the connection rather than adding a second one.
Cloud keeps each installation's repository list for a short while, because reading it from GitHub is slow. A list younger than five minutes is used as it is. After that, the next view still shows the kept list while Cloud reads a fresh one behind it, so a repository you granted a moment ago can take up to five minutes and one more reload to appear under Repository. Branch lists are kept the same way.
Create a service from a repository
On a project, press Add a service, then Create on the Git repository (GitHub App) card. With no GitHub account connected, the form is replaced by a card reading "Connect GitHub first" with Go to Git providers.
The form, "From a GitHub repository", asks for:
| Field | What to choose |
|---|---|
| Account | One of your connected GitHub accounts or organizations. |
| Repository | "The repositories this account has given the app access to." Type to search. |
| Branch | The branch to build. When the repository has main, or else master, Cloud picks it for you. |
| Build with | Filled in once a branch is chosen. The line under it reads "Reading the repository." and then "From the repository:" with what Cloud found, such as "From the repository: package.json, with pnpm." Change it if it guessed wrong. |
| Name | Up to 40 characters. |
| Size | The size the service runs at. Sizes and replicas explains them. |
The Order summary beside the form shows the hourly rate of the size you chose. Press Create service. Cloud opens the new service's page. Nothing is deployed yet, so you can set the environment, the port or a volume first. When you are ready, press Deploy.
The form has no field for commands, the build path or deploy triggers. Cloud fills the commands in from the repository, and every one of them can be changed afterwards on the service's Source card. Build settings covers the build, and Source and deploy triggers covers the branch, pushes and watch paths.
The Repository and Branch lists show up to 1,000 entries each.
What a deploy does
At each deploy Cloud mints the short-lived token, hands the clone address to the build, and records the commit the branch pointed at when the deploy began. The deployment page shows it under Commit, as a short SHA and the first line of its message.
A push to the branch deploys the service again, unless you set Deploy on to Only when I ask on the Source card. Source and deploy triggers explains watch paths and the pushes that never deploy.
A push during a deployment is dropped
A push that arrives while a deployment of the service is still running is not queued. Nor is one that arrives while your account is suspended. Cloud drops it, and the commit it carried is not deployed until you push again or press Deploy.
When GitHub cannot be reached
A deploy that cannot get a token from GitHub ends as Failed with this sentence:
Cloud could not reach this repository on GitHub. Check the GitHub App can still see it, then deploy again.The usual cause is a repository removed from the App's access on GitHub, or the App uninstalled. Give the App access again on GitHub and deploy.
Disconnect an account
Disconnect on a connection opens "Disconnect this provider?". Cloud refuses to disconnect a GitHub account that a service still builds from, with:
A service still builds from this connection. Remove it first.Move each such service to another account on its Source card, or delete it, and then disconnect. Disconnecting removes the connection from Cloud only: the App stays installed on GitHub until you uninstall it there.