Deploying from Git
Connect a GitHub repository to deploy from the console, or deploy automatically on every push.
Connect a GitHub repository to an app and you can deploy from the console without a terminal. Install the GitHub App and every push to a branch deploys automatically.
| How you connect | Public repos | Private repos | Deploy on push |
|---|---|---|---|
| Repository address only | ✓ (manual deploys from the console) | — | — |
| After installing the GitHub App | ✓ | ✓ | ✓ |
Import as a new app
- In the console, go to
/deploy?repo=owner/repo(owner/repois the GitHub repository name). - Confirm the repository and enter an app name and any environment variables you need.
- If the repository's
nitroship.jsonhas nocompute.regions, also pick a compute region. It is saved as the app's compute setting; values in the file still take precedence. - Press Deploy app. The app is created, the repository is connected, and the first production build starts. Follow its progress on the build screen.
You can also pass ref (branch) and dir (a monorepo subfolder) in the address:
/deploy?repo=owner/repo&ref=main&dir=apps%2FwebConnect a repository to an existing app
- In the app's Settings → Git repository, press Connect repository.
- Pick the repository (
owner/repo). - Set the production branch, root directory, and automatic deployments. (See below.)
Once connected, Deploy latest starts a production build right away. Press Change to switch repositories or Edit to adjust settings. Disconnecting does not delete existing deployments; pushes simply stop starting new builds.
Connecting apps or deploying a repository requires permission to manage apps in that team (owner or member).
Private repositories: connect the GitHub App
If a private repository does not show up in the list, the Nitroship GitHub App cannot access it yet.
- Press Connect GitHub.
- Choose an existing GitHub App installation, or install it on another GitHub account or organization and select the repositories it may access.
- When you return to Nitroship, the repository picker opens again.
One GitHub App installation can be connected to several Nitroship teams. Disconnecting it from one team leaves the others connected.
Automatic deployments
Production branch
The branch you choose when connecting is the production branch; it does not have to be the default branch. With the GitHub App, production auto-deploy is on by default: pushing to this branch starts a production build. You can turn it off.
Preview branches
Turn on preview auto-deploy and pushes to any other branch start preview builds. It is off by default and independent of production auto-deploy.
Include and exclude patterns decide which branches build:
- With no include patterns, every branch except the production branch builds.
- Branches matching an exclude pattern never build, even if they match an include pattern. Example:
dependabot/**
| Pattern | Matches | Example |
|---|---|---|
* | Any characters except / | feature/* matches feature/login but not feature/team/login |
** | Any characters, including / | release/** also matches release/2026/09 |
? | One character other than / | v? matches v1 |
Patterns match the whole branch name and are case-sensitive.
If you connected a public repository without the GitHub App, there is no deploy on push. Deploy the latest commit manually from app settings.
Root directory (monorepos)
If the app lives in a subfolder such as apps/web instead of the repository root, set the root directory to apps/web. Leave it empty for the repository root.
Branch URLs
When a deployment with Git branch information becomes ready, its branch gets its own address, whether the deployment is production or preview.
<app-slug>-git-<branch>.rev.ntro.run
e.g. my-app-git-feature-login.rev.ntro.run- It points to the most recently created deployment of that branch that became
ready. An older build finishing late never moves the address back. - The revision URL pinned to each commit keeps working too.
How a branch name becomes part of the address
- Convert it to lowercase.
- Replace every run of characters other than lowercase letters and digits with a single
-, then trim-from both ends. Example:Feature/Login_Page→feature-login-page - If the result is empty, the first part of the hostname would exceed 63 characters, or it collides with another address, append a hash of the original branch name (the first six hex digits of its SHA-256), keeping only as much of the start of the branch part as fits.