Update from a Publish Branch

Last modified: October 9th, 2024

A diagram of the new CloudCannon UI, with update notification icons on the Publish button and a callout to update this site.

CloudCannon will detect when you or a team member have changed your Publish Branch. When updates are available, a red notification icon will appear on the Publish button in your Site navigation.

You can update your site to match the changes made to your Publish Branch to see how your pending changes and updates from other branches work together. We recommend updating your site, particularly if you have long-lived branches or are working on the same files across different branches.

To update your site:

  1. Click on the Publish button in the Site navigation.
  2. On the Publishing page, click the Update this site button.

CloudCannon will pull available updates from your Publish Branch.

Configure an upstream commit message template#

Updating from a Publish Branch will merge upstream changes with a merge commit or pull request. You can configure a commit message for these merges in your CloudCannon configuration file. Configuring a commit message will help you to maintain a consistent format.

Upstream commit messages use template strings. To add an upstream commit template, add the key upstream_commit_template to the root level of your global configuration file.

Your upstream_commit_template should look something like this:

/cloudcannon.config.yaml
copied
upstream_commit_template: "Merge branch [publish_branch] into develop of [branch] by [author] at [date]"

An upstream commit message template can contain plain text and placeholders. Placeholders insert data related to the commit and use [ ] brackets. CloudCannon supports the following commit placeholders:

  • [branch] — the name of the current branch.
  • [publish_branch] — the name of the Publish Branch from which you merge upstream changes.
  • [author] — the email address of the person responsible for the upstream merge.
  • [date] — the date of the upstream merge in the format "Tue Nov 28 2023 21:46:17 GMT+0000".

Open in a new tab