Deploy from GitHub
Build and deploy an app from a GitHub repository, through the StackBlaze GitHub App or from any public repository URL.
This guide deploys stackblaze/react-vite-starter, a small public React app, into a new project. StackBlaze builds it from source.
Add a GitHub repository
In your project, click + Service. The menu lists everything you can add to the environment. Choose GitHub repository (Build and deploy from a repo).

Pick the repository
Git repository lists the repositories the StackBlaze GitHub App can see. The menu on the left switches between the GitHub accounts and organizations you installed the app on. Type to search, then click Select next to the repository.

The account menu also has Use a public repo (see below).

The gear button next to the search has two items:
- Refresh reloads the accounts and repositories.
- Add org / repositories opens GitHub's install page for the StackBlaze GitHub App in a popup. There you choose which accounts and repositories the app can access.

Review
The app appears on the canvas as Ready to deploy. Click the card to open the review panel.

Right after you pick a repository, clicking the card can say "Still adding it to the canvas…". Wait a moment and click again.
The review panel shows the repository and what will be deployed:
- Branch: the menu next to the repository picks the branch to build. This repository only has
main. - Change goes back to the repository picker.
- Each app shows its build method and folder, here Railpack (auto-detect, fast rebuilds) · ./.
- Runtime opens a start command (blank keeps the build's default) and the Port the app listens on.
- Configure opens the app's full settings: variables, build method, build path, autodeploy, visibility, domains and more. See Service settings.



Deploy
Click Deploy. StackBlaze builds the app from the repository, then starts it. When the card shows Running, the card shows its public URL on stackblaze.app, with HTTPS.


Deploy several apps from one repository
For a monorepo, add one app per folder. In the review panel, click Add another app from this repo. Root Directory shows the repository's folders; the root is marked Added because it is already in this deploy. Pick a folder, or search for one, and click Add.

Deploy a public repository
You don't need the GitHub App for a public repository. In the account menu, choose Use a public repo, paste the repository's HTTPS URL, such as https://github.com/stackblaze/react-vite-starter, and press Enter.

The app is added to the canvas as Ready to deploy. Click it to open the same review panel, titled Public git repo, and deploy it the same way.

After the first deploy
The service follows its branch. Every push to it builds and deploys the new commit while Autodeploy is on (the default). The rules for which pushes build, and how to skip one with [skip deploy] in the commit message, are in How StackBlaze works. Build settings and what detection filled in are in Source and build.
The check on each commit
For a repository connected through the GitHub App, StackBlaze adds a check to each commit it builds. It's named Stackblaze / and the build method, for example Stackblaze / railpack, and its title names the service and where it runs, for example react-vite-starter-4l47 (github-demo-587h/dev). It shows as in progress while the build runs, then as successful, failed or timed out. You can require it in GitHub's branch protection rules.
How StackBlaze sees your repository
Access goes through the StackBlaze GitHub App installation, not a personal token. The App receives the push and pull request events of the repositories you installed it on, so there's no webhook to add to each repository. To stop StackBlaze reading a repository, remove it from the App's repositories on GitHub, or uninstall the App (Add org / repositories opens that page). See Integrations.
Preview environments need the App too, because it's how StackBlaze sees pull requests.