Deploy your changes to an environment

After you make changes to your locally running content management instance, you can use the Sitecore Command Line Interface (CLI) to upload your changes to an existing SitecoreAI environment.

Decoupled architecture

In decoupled deployments, a SitecoreAI project can contain multiple environments that serve different roles, such as authoring environments and editing hosts. When deploying changes using the CLI, ensure that you target the correct environment for your deployment. Deployments are applied only to the specified environment and are not automatically propagated across environment types.

To deploy and upload your solution to the SitecoreAI environment:

  1. In the project working directory, in a command-line window, run the following command:

    RequestResponse
    # Deploy editing host
    dotnet sitecore cloud editinghost deploy --environment-id ${edtEnvId} --upload
    
    # Deploy authoring environment
    dotnet sitecore cloud deployment create --environment-id ${envId} --upload
    
  2. When the deployment completes, navigate to the CM instance and review all the artifacts deployed to the targeted environments.

The default value for the --upload command parameter is the current working directory. When providing the argument, everything in the directory is packaged and deployed to SitecoreAI unless specified in a .gitignore file.

To use another folder, use the --upload parameter and provide the path to another directory with the --working-dir (-dir) parameter. For example:

RequestResponse
dotnet sitecore cloud deployment create --environment-id <id> --no-start --no-watch --upload --working-dir <path>

Do you have some feedback for us?

If you have suggestions for improving this article,