Docs menu
Source Control
Connect a git repo once, and every push to a tracked branch builds and deploys your app.
On this page
Primcloud deploys from git. Connect your repos once, and every push to a tracked branch builds and deploys your app. This page covers setting up the connection, managing it, and removing it.
Connecting GitHub#
From your account settings, click Connect GitHub to install the Primcloud GitHub App. GitHub asks whether to give it all repositories or only select repositories; you can change this later without reconnecting. GitHub then asks you to authorize Primcloud, and we connect the installation once that confirms your GitHub account can access it.
Only someone who controls the installation's account can connect it:
- A personal account: the GitHub user who owns it.
- An organization: an admin of the organization. Members who aren't admins, and people whose invitation is still pending, can't.
If you install on an organization you don't own, GitHub asks an owner to approve it, and Primcloud shows that it's waiting. Once it's approved, an admin of the organization connects it with Connect GitHub.
The connection then appears in your Providers list, and every repo it can see is available when you create or edit an application.
The App reads the code of the repos you give it, to build them, and their pull requests, so each deploy shows the one it shipped. It writes checks and deployments on their commits to show each deploy's status; see Status on GitHub.
Repository access#
You choose which repos Primcloud can see on the App's configuration page on GitHub:
- A personal account: Settings → Applications → Installed GitHub Apps, then Configure next to Primcloud.
- An organization: the organization's Settings → GitHub Apps (under Third-party Access), then Configure next to Primcloud.
Add a repo there and it's available in Primcloud without reconnecting. Remove one, or Suspend the App, to take access away.
When an application loses its source#
An application loses its source when Primcloud can no longer reach its repo: you remove the repo's access, disconnect or uninstall the App, delete the repo, or transfer it to an account you haven't connected. When that happens:
- Your app keeps running.
- Pushes stop deploying it, and a manual deploy or redeploy is refused.
- Rollbacks still work, and so do deploys from a secret or compute change, since they don't need your code.
- A banner on the application says no source is linked, with a button to pick a repository.
To link it again, pick a repository from the application's settings (Change on the Source card), which also deploys the latest commit of the chosen branch. If you removed the repo's access, giving it back works too: the next push links the application again and deploys it.
Renaming, moving, or archiving a repo#
An application follows its repo, not the repo's name:
- Rename the repo and the application shows the new name. Pushes keep deploying it.
- Transfer it to another account you've connected and the application moves with it. Pushes keep deploying it.
- Archive it and every application deployed from it shows a banner saying so, and its Source card marks the repo Archived. GitHub accepts no pushes to an archived repo, so nothing deploys until you unarchive it, and then the banner goes away.
Deleting the repo, or transferring it to an account you haven't connected, removes the application's source.
Suspending the App#
Suspend on the App's configuration page blocks Primcloud from every repo on that account until you unsuspend it. While it's suspended:
- The connection shows Suspended in your Providers list, and its applications show a banner saying so.
- Pushes don't deploy, and a manual deploy or redeploy fails. Your apps keep running.
- Picking a repo or branch from that account shows an error with a Try again button.
Hit Unsuspend on the same page and everything goes back to normal, with nothing to reconnect.
Branches and environments#
Each environment tracks one branch, and a push to it deploys that environment. On Standard, an application's production environment tracks the branch you picked at import. On Pro and Team, each additional environment tracks its own.
Change the tracked branch from the application's settings. The next push to the new branch deploys, and the old branch stops deploying the environment.
When you push to a tracked branch, Primcloud builds the commit and releases it with no dropped requests. If the build fails, your running app is untouched and the failed deployment shows the log. If your account can't deploy, for example because it has no payment method on file, nothing deploys and the commit gets a failed check. See Deployments.
Disconnecting#
- Disconnect the connection in your Providers list and confirm with your password.
- Remove a repo from the App's configuration page. The App stays installed for your other repos.
- Uninstall the App on the same page. Primcloud loses access to every repo on that account, and the connection leaves your Providers list.
Each of these removes the source of every application using the affected repos. Your apps keep running.
Warning
To take an application down for good, delete it on Primcloud too, or its compute keeps billing.
Troubleshooting#
A repo you just gave access to isn't showing up. It can take a minute to appear. Refresh the page, and if it's still missing, check the repo is selected on the App's configuration page.
Warning
Don't disconnect and reconnect to refresh the list. Disconnecting removes the source of every application using that account's repos.
"No repositories available" when creating an app. The App isn't installed, or has no repos selected. Install it with Connect GitHub, or select at least one repo on its configuration page.
Pushes aren't deploying. Check that you pushed to the branch the environment tracks, that the application has no banner saying its source is missing or its repo is archived, and that the connection isn't Suspended in your Providers list. If all three look right, contact support with the repo, the branch, and roughly when you pushed.