Choose your preferred SSG:
Choose your preferred SSG:

Setting up a publish branch with merging or pull requests

Publishing allows editors to merge changes from one branch to another. You can choose to merge directly or with a pull request. Selecting a publish branch enables the publish interface for your site — this is a useful approach for staging sites.

Publishing workflows are enabled by default for branched sites in projects.

Adding a publish branch

To connect a publish branch and enable publishing:

Go to Site Settings / Publishing and click Add Publish Branch.

Screenshot of publish settings with no branch set

Select the branch you want to merge into and click Add Publish Branch. This will fail if there is no additional branch in the repository.

Once set up, editors can publish changes back to the main branch.

Choosing your publish mode

The publish mode determines if publish is a direct merge or a pull request. Merges have less overhead, while pull requests can trigger external builds and workflows. To change the publish mode for a Git connected site:

  1. Go to Site Settings / Publishing
  2. Select Merge or Pull Request
  3. Click Update Publish Settings
Screenshot of publish settings with branch set

Delete after Publish

You can choose to delete the site associated with the development branch after publishing. This is useful if you know that no further development will take place on that branch after it is merged.

To turn this feature on, go to Site Settings / Files / Publishing and click the checkbox labelled Delete this site after publish.

Screenshot of publish settings with option to delete site enabled
Was this article helpful? or Suggest an improvement >

Related articles