Get the FREE Ultimate OpenClaw Setup Guide →

orchardcore-deployments

Scanned
npx machina-cli add skill CrestApps/CrestApps.AgentSkills/orchardcore-deployments --openclaw
Files (1)
SKILL.md
3.6 KB

Orchard Core Deployments - Prompt Templates

Create a Deployment Plan

You are an Orchard Core expert. Generate deployment plan configurations for Orchard Core sites.

Guidelines

  • Deployment plans export site configuration as a portable package.
  • Each deployment plan contains one or more deployment steps.
  • Steps are executed in order during deployment.
  • Use deployment plans to move configuration between environments (dev, staging, production).
  • Content definitions, content items, settings, and features can all be exported.
  • Deployment plans generate recipe JSON files that can be imported into target sites.
  • Remote deployment targets can be configured for automated deployment.

Deployment Step Types

Common deployment step types include:

  • AllContentDeploymentStep - Export all content items.
  • ContentTypeDeploymentStep - Export specific content type definitions.
  • ContentDeploymentStep - Export specific content items by content type.
  • SiteSettingsDeploymentStep - Export site settings.
  • AllFeaturesDeploymentStep - Export all enabled features.
  • RecipeFileDeploymentStep - Include a recipe file in the deployment.
  • CustomFileDeploymentStep - Include custom files in the deployment.

Configuring Remote Deployment

To enable remote deployment, enable the OrchardCore.Deployment.Remote feature.

{
  "steps": [
    {
      "name": "Feature",
      "enable": [
        "OrchardCore.Deployment",
        "OrchardCore.Deployment.Remote"
      ],
      "disable": []
    }
  ]
}

Deployment Plan Recipe Export

A deployment plan produces a recipe JSON like:

{
  "name": "{{DeploymentPlanName}}",
  "displayName": "{{DisplayName}}",
  "description": "Exported deployment plan",
  "author": "{{Author}}",
  "website": "",
  "version": "1.0.0",
  "issetuprecipe": false,
  "categories": [],
  "tags": [],
  "steps": [
    {
      "name": "ContentDefinition",
      "ContentTypes": [],
      "ContentParts": []
    },
    {
      "name": "Content",
      "data": []
    }
  ]
}

Creating Deployment Steps in Code

using OrchardCore.Deployment;

public sealed class MyCustomDeploymentStep : DeploymentStep
{
    public MyCustomDeploymentStep()
    {
        Name = "MyCustom";
    }
}

public sealed class MyCustomDeploymentStepDriver : DisplayDriver<DeploymentStep, MyCustomDeploymentStep>
{
    public override IDisplayResult Display(MyCustomDeploymentStep step)
    {
        return Combine(
            View("MyCustomDeploymentStep_Summary", step).Location("Summary", "Content"),
            View("MyCustomDeploymentStep_Thumbnail", step).Location("Thumbnail", "Content")
        );
    }
}

public sealed class MyCustomDeploymentSource : IDeploymentSource
{
    public async Task ProcessDeploymentStepAsync(DeploymentStep step, DeploymentPlanResult result)
    {
        if (step is not MyCustomDeploymentStep customStep)
        {
            return;
        }

        // Add data to the result
        var data = new JObject(
            new JProperty("name", "MyCustom")
        );

        result.Steps.Add(data);
    }
}

Registering Deployment Steps

public sealed class Startup : StartupBase
{
    public override void ConfigureServices(IServiceCollection services)
    {
        services.AddDeployment<MyCustomDeploymentStep, MyCustomDeploymentStepDriver, MyCustomDeploymentSource>();
    }
}

Source

git clone https://github.com/CrestApps/CrestApps.AgentSkills/blob/main/src/CrestApps.AgentSkills/orchardcore/orchardcore-deployments/SKILL.mdView on GitHub

Overview

This skill provides templates for configuring Orchard Core deployment plans that export site configuration as portable recipes. Plans contain one or more steps and are executed in order to move content, definitions, settings, features, and recipe files between environments. It also covers enabling remote deployment with the OrchardCore.Deployment.Remote feature.

How This Skill Works

Deployment plans generate recipe JSON files that can be imported into target sites. You configure deployment steps such as AllContentDeploymentStep, ContentTypeDeploymentStep, ContentDeploymentStep, SiteSettingsDeploymentStep, AllFeaturesDeploymentStep, RecipeFileDeploymentStep, and CustomFileDeploymentStep, then run them in sequence. Remote deployment is enabled by enabling the OrchardCore.Deployment.Remote feature.

When to Use It

  • Move configuration and content from dev to staging or production using a defined sequence of steps.
  • Export specific content types or individual content items for targeted imports.
  • Include site settings or all features to mirror environment configurations.
  • Bundle a recipe JSON with content and configuration for import into a target site.
  • Enable remote deployment to automate deployments across environments.

Quick Start

  1. Step 1: Create a deployment plan in Orchard Core and add steps like AllContentDeploymentStep and SiteSettingsDeploymentStep.
  2. Step 2: Generate the recipe JSON from the plan so it can be imported on the target site.
  3. Step 3: If deploying remotely, enable OrchardCore.Deployment.Remote and apply the plan to the target environment.

Best Practices

  • Define deployment steps in a logical order (definitions, content, settings, features).
  • Export only the necessary content and settings to minimize package size and risk.
  • Test the deployment plan in a non-production environment before live use.
  • Enable OrchardCore.Deployment.Remote when planning automated remote deployments.
  • Validate the generated recipe JSON to ensure compatibility with the target site.

Example Use Cases

  • Export all content items and definitions with AllContentDeploymentStep and ContentTypeDeploymentStep.
  • Export specific content types using ContentTypeDeploymentStep to replicate schema across environments.
  • Include site settings with SiteSettingsDeploymentStep to synchronize configurations.
  • Attach a recipe file via RecipeFileDeploymentStep for easy import into a target site.
  • Enable remote deployment and configure a deployment plan for automated cross-environment updates.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers