Read the related article first to get the context: Deploy Unicorn serialization to XM Cloud using IAR - A hack you should not do
This repo is to show how you can update the basic foundation head to deploy through GitHub actions, generating an IAR of Unicorn serialization files, and push that to XM Cloud.
The challenge: Take an existing Unicorn serialization file and have the item get created in XM Cloud.
The pieces that make it work:
- Deploy pipeline in GitHub actions (or your favorite DevOps tool) that invokes the Sitecore CLI
- The Sitecore CLI itemres –unicorn command to create an IAR .dat file from Unicorn serialization
- A placeholder .dat file in App_Data that is part of the solution being deployed.
The result: It works. (With hacky things) Not supported by Sitecore, could stop working at any time. You shouldn’t do it.
-
In an ADMIN terminal:
.\init.ps1 -InitEnv -LicenseXmlPath "C:\path\to\license.xml" -AdminPassword "DesiredAdminPassword"
-
Restart your terminal and run:
.\up.ps1
-
Follow the instructions to deploy to XM Cloud