Skip to content
Help center

How do I connect GitHub to my app?

Connect a GitHub repository to an app, pick a branch, and have every push build a new version by itself.

Updated 17 Oct 20262 min read

When we ask Where's your code?, choose GitHub, then Connect GitHub; pick the repositories Tanzahost may read on GitHub's own page, then choose the repository and branch and press Deploy.

GitHub isn't switched on yet

Connecting GitHub needs our GitHub app, which isn't set up yet. Until it is, the GitHub tab says "GitHub isn't set up yet." Uploading a ZIP of your code works today: choose Upload a ZIP in the same place.

Connect a repository

Asha keeps her Laravel shop in a repository called asha/duka. This is how she connects it.

  1. On your project's page, in the Add a service card, choose App. For an app you already have, open it and choose Send new code on its code card.

  2. Under Where's your code?, choose GitHub.

  3. Choose Connect GitHub. GitHub opens and asks which repositories Tanzahost may read. Pick only the ones you need, then come back.

  4. Under Repository, choose your repository. Under Branch, choose the branch to build, like main.

  5. Leave Build every time I push on if you want each push to deploy by itself.

  6. For a new app, give it its name and limits. Then choose Deploy. The build starts, and you watch every line as it happens.

What Tanzahost can see

  • It can only read the code of the repositories you chose. It never changes your code. The one thing it writes is a comment on a pull request, with that pull request's preview address.

  • It hears about your pushes from GitHub, and only accepts the ones GitHub signed.

  • To change which repositories it may read, change the Tanzahost app's access in your GitHub settings.

After it's connected

The app's code card says "Connected to asha/duka, branch main". Each push becomes a new version in Versions, and you can build any of them again with Build again.

For everything about builds and deploys, read Deploying.