Skip to main content
Version: 1.0.0

Preview Branches

Preview branches are ephemeral deployments of branches, typically created for the purpose of reviewing and testing changes before merging them into the main branch. Preview Branches provide an isolated environment for live testing and QA.

Video: Preview Branches Zeet walkthrough

Viewing Preview Branches

Zeet's default configuration includes the activation of Preview Branches for your Project. When you create a pull request in the GitHub repository tracked by a Zeet Project, Zeet will automatically generate and deploy a preview branch corresponding to that PR. You can see the preview branch deployment status as a comment in your PR from the zeet-corp bot.

You can also see all the branches deployed for your Project by clicking on the View all Branches button from the Deployments tab of your Project details page.

Configuring Automated Preview Branches

As previously mentioned, Zeet comes with Preview Branches enabled as the default setting for your Project. You have the flexibility to review and modify this in the CI/CD tab of your Project settings under the Branch Rules section.

  • Auto Deploy Branches: Deactivating this option effectively turns off the creation of Preview Branches for your GitHub repository associated with the Project.
  • Auto Stop Branches: By default, Zeet automatically suspends the preview branch when the associated Pull Request is merged. If you prefer to keep the preview branches active even after the code has been merged, you can disable this feature.

Here, you can also configure the compute resources for your Preview Branches.

Manually Creating Preview Branches

You can always manually create a Preview Branch by clicking on the New Branch button from the Deployments tab of your deployments page. You can then select the branch you want to deploy and click on the Deploy button.

If you have no branches deployed, you can find the Branch view by clicking on the View All Branches button from the Deployments tab of your Project details page.

Override the Git Branch on a Preview Branch

You can override the Git branch on a Preview Branch by using the Override field in the New Branch dialog. Override is useful when you want to deploy a branch with a different name than the one in your Git repository. You can also specify specific commits or tags to deploy using the override field.

Configuring Production Branch

By default Zeet deploys a production branch for your Project. The production branch is the main branch of your Project. Production branch and Preview branches share the same deployment settings except for resources and networking settings. When you change the production branch, Zeet will apply the default resources settings to the new branch. The existing production branch will continue to be deployed until you terminate it. If the new production branch does not exist as a preview branch, Zeet will create a new deployment for it.