Connect a Publish Branch

Last modified: November 29th, 2023

Working with a specific static site generator?
Customize CloudCannon's documentation to suit your SSG.

Great! We'll show you documentation relevant to .
You can change this any time using the dropdown in the navigation bar.

The CloudCannon publishing workflow lets your team edit your content on a branch site. Team members can merge their changes into the Publish Branch directly or with a pull request.

Connecting a Publish Branch allows you to create a staging site to test changes without affecting your live site.

  • Publish Branch — This is the site to which you publish your changes. This could be your live site.
  • Branch Site — This is the site on which you make or test your changes. This could be your staging site.

CloudCannon enables publishing workflows for branched sites inside a Project by default.

Connect a Publish Branch#

You must have two or more branches in your repository and two or more sites on CloudCannon to enable publishing.

Let’s connect the branched site to your Publish Branch.

  1. Navigate to the Publishing tab under Site Settings.
  2. Search for the name of the branch connected to your Publish Branch and click Add Publish Branch.
A screenshot of the CloudCannon app shows the Publishing tab on the Site Settings page, with a button to Add Publish Branch.

Your team can now publish changes to your Publish Branch via the Publish button in the sidebar of the branch site.

Change your publish mode#

CloudCannon offers two publishing modes: merge immediately or via pull request.

Merge immediately means that your team members can publish changes from a branch site to the Publish Branch without approval. This mode is great for small teams or when you want less overhead.

Pull request mode requires approval from another team member before changes can be merged with your Publish Branch. You can also configure Pull Requests to trigger external builds and workflows.

To change your publish mode:

  1. Navigate to the Publishing tab under Site Settings.
  2. Select Merge changes immediately or Create a Pull Request for approval.
  3. Click Update Publish Settings.
A screenshot of the CloudCannon app shows the Publishing tab on the Site Settings page, with the option to select Merge or Pull Request.

Delete after publishing#

You can choose to delete your branch site after a successful merge. Deleting branch sites is useful if your team creates branch sites for defined changes that require no further development after merging.

CloudCannon automatically enables this setting for branched sites inside a Project.

To change your delete setting:

  1. Navigate to the Publishing tab under Site Settings.
  2. Check or uncheck the box labeled Delete this site after publishing.
  3. Click Update Publish Settings.

Related Articles

Open in a new tab