Deploy from GitHub
Connect a GitHub repo to a service and openrail builds and deploys every push to its branch.
Public repos
Public repos need no setup.
- On the canvas, select + Add, then GitHub Repo.
- Paste the repo URL, for example
https://github.com/owner/name. - Review the scan: Dockerfile or Railpack, config files found, suggested port and variable names from
.env.examplefiles. - Select Deploy Now, or Add Variables to stage the service and set variables first.
Automatic deploys for public repos poll the branch every 2 minutes.
Private repos and push webhooks
Private repos need a GitHub App, which openrail creates for you:
- Go to Settings, GitHub. Optional: type an Organization to create the app there.
- Select Connect GitHub and confirm on GitHub. No keys are copied by hand.
- Install the app on the repos it may read.
- Repo pickers now list those repos. Pushes reach openrail through the app's webhook and deploy at once.
GitHub App covers each step, organizations, and what to change after a console domain change.
Any repo picker also offers Connect GitHub when no app exists yet, and keeps what you typed while you connect.
The app asks for read access to contents, metadata, pull requests and checks, and the push event.
Branch and root directory
In Settings > Source, set Branch (default: the repo's default branch) and Root directory for monorepos. See Monorepos and watch paths.
How the build is chosen
- A
Dockerfilein the root directory is used when present. - Otherwise Railpack detects the language and builds an image.
- A
railway.json,railway.toml,openrail.yamloropenrail.jsonfile overrides settings. See Config as code.