/xmcloud-unicorn-deployment

An experimental proof-of-concept to use GitHub actions, Unicorn, Items as Resources, and Sitecore CLI to push Unicorn serialized items into XM Cloud.

Primary LanguageTypeScript

XM Cloud Starter Kit (Next JS) with Unicorn serialization deployment

Read the related article first to get the context: Deploy Unicorn serialization to XM Cloud using IAR - A hack you should not do

About this Solution

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.

What’s the TL;DR?

The challenge: Take an existing Unicorn serialization file and have the item get created in XM Cloud.

The pieces that make it work:

  1. Deploy pipeline in GitHub actions (or your favorite DevOps tool) that invokes the Sitecore CLI
  2. The Sitecore CLI itemres –unicorn command to create an IAR .dat file from Unicorn serialization
  3. 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.

QUICK START for the XM Cloud Starter Kit (without using Unicorn serialization or GitHub Actions)

  1. In an ADMIN terminal:

    .\init.ps1 -InitEnv -LicenseXmlPath "C:\path\to\license.xml" -AdminPassword "DesiredAdminPassword"
  2. Restart your terminal and run:

    .\up.ps1
  3. Follow the instructions to deploy to XM Cloud

  4. Create Edge token and query from edge