Skip to content
Back

How to make only main branch trigger build in sites

  • 0
  • Sites
  • Cloud
Vinicius Brito
1 Sep, 2025, 23:20

Hello! Using cloud. On sites, when I push to github a commit I made to a branch in the repo, which is not the main branch and it is not the one set as "production" branch, the site gets built nonetheless.

If that is intended, this temporary branch of mine is labeled "dev", is it accessible somehow in a different URL, or does it replace the content of the branch labeled "main" which is the one set as production?

TL;DR
Developers are looking to have the main branch exclusively trigger a build in their sites on the cloud platform. Currently, pushing commits to a non-main branch also initiates a build, even if it's not the designated production branch. They are curious if the 'dev' branch content can be accessed via a distinct URL or if it overrides the 'main' branch content.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more