Best practices in post-deployment publishing in XM Cloud


Description

The article provides best practices in the publishing of content as a post-deployment action by means of the XM Cloud Deploy application.

Post-deployment actions run in the order that they are defined in the xmcloud.build.json file, with the publish action at the end. Only one publish action is supported in the xmcloud.build.json file. If multiple publish action nodes have been configured, only the last one will be processed. Avoid misconfiguration by using a single publish action.

As the path property of the publish action supports a single value, the itemIds property must be used if you need to publish an array of items. For example:

"publish": {
  "path": "",
  "languages": [ "en", "fr-CA"],
  "itemIds": ["ID1", "ID2", "ID3", "ID4"],
  "targets": ["Edge"],
  "republish": true,
  "publishSubItems": true
}

This configuration example implies that multiple items in the specified languages are published with their subitems to the Edge publishing target.

If you specify both the path and the itemIds in the configuration, only the itemIds property will be considered, and the value of the path property will be ignored. In this case, only the items defined under the itemIds property will be published.

The post-deployment publish action has a limitation compared to the basic publishing functionality in the Content Editor and Experience Editor: the Publish related items option is not supported in the configuration. You can consider one of the following alternative options:

If you encounter issues with post-deployment publishing, check the Deployment Log which provides details about post actions processing. You can get a full picture of the publishing process using the Deployment Log in combination with the Publishing Log.