App from Git
Connect the Git account
Section titled “Connect the Git account”In Settings → Git accounts (Configurações → Contas Git), connect GitHub, GitLab, Gitea or Bitbucket with an access token. Public
repositories do not need an account. For repositories in the git@… format, register a key in Settings → SSH keys (Configurações → Chaves SSH).
Create the service
Section titled “Create the service”- In the project, click New service → App (Novo serviço → App) and choose Git.
- Choose the repository and the branch (e.g.
main). - Choose how to build:
- Dockerfile — the repository already has a
Dockerfile; - Railpack — the panel figures out the language on its own and builds the image (Node, Python, Go, PHP, Ruby, Java…);
- Static site (Site estático) — ready-made HTML or HTML generated by a command (e.g.
npm run build).
- Dockerfile — the repository already has a
- Enter the port the app listens on, if it is not a static site.
- Click Create and deploy (Criar e implantar).
The build log shows up live. When it finishes, connect a domain.
Automatic deploys
Section titled “Automatic deploys”In the service’s Advanced (Avançado) tab, turn on automatic deploys (deploy automático). The panel shows the webhook address to paste into the repository (GitHub: Settings → Webhooks). On every push to the chosen branch, a new deployment starts on its own.
Watched paths (monorepo)
Section titled “Watched paths (monorepo)”In repositories with several apps, enter the service’s watched paths (caminhos vigiados): a push that does not touch them does not trigger a deployment.
Pull request previews
Section titled “Pull request previews”Turn on previews and each pull request gets a test version with its own address (pr-12.<domínio base>).
A new commit on the PR redeploys it; a closed PR deletes the preview. See Previews.