sfnext-deployment
Build and deploy Storefront Next storefronts to Managed Runtime (MRT) using the sfnext CLI. Use when running production builds, pushing bundles to MRT with sfnext push, configuring deployment environments, or deploying Page Designer cartridges. This is for Storefront Next deployment — for general MRT management via b2c CLI, see b2c-cli:b2c-mrt.
What this skill does
# Deployment Skill This skill covers building and deploying Storefront Next storefronts to Managed Runtime (MRT). ## Overview Storefront Next storefronts are deployed to MRT as bundles. The `sfnext` CLI handles building and pushing bundles, while environment configuration is managed through MRT environment variables. ## Production Build ```bash # Build for production pnpm build # The build output goes to build/ directory ``` The production build: - Compiles TypeScript to JavaScript - Bundles client and server code separately - Optimizes and minifies assets - Generates the static Page Designer registry ## Deploying to MRT ### Using sfnext CLI ```bash # Push the current build to MRT pnpm push # Push with a specific message pnpm sfnext push -m "Release v1.2.0" # Push to a specific environment pnpm sfnext push --environment staging --wait ``` ### Deployment Flow ``` pnpm build → pnpm push → MRT receives bundle → Deployed to environment ``` See [MRT Deployment Reference](references/MRT-DEPLOYMENT.md) for detailed deployment options. ## Environment Configuration Environment variables for MRT are configured through: 1. **MRT Dashboard** — Set `PUBLIC__` variables per environment (baked into the app at build time) 2. **CLI flags or `MRT_*` environment variables** — Control push/deploy targets 3. **`.env` files** — Local development only (not deployed) ### MRT Deployment Variables ```bash # Project slug (required for push) MRT_PROJECT=my-project-slug # Target environment (optional — if omitted, bundle is uploaded but not deployed) MRT_TARGET=development ``` ### Application Variables (set in MRT Dashboard) ```bash PUBLIC__app__commerce__api__clientId=prod-client-id PUBLIC__app__commerce__api__organizationId=prod-org-id PUBLIC__app__commerce__api__shortCode=prod-short-code ``` ## Page Designer Cartridge Deployment Page Designer metadata must be deployed separately to Commerce Cloud (not MRT): ```bash # Generate cartridge metadata pnpm generate:cartridge # Deploy cartridge to B2C instance pnpm deploy:cartridge # Deploy with clean (removes old cartridge first) pnpm deploy:cartridge:clean # Validate cartridge structure pnpm validate:cartridge ``` Cartridge metadata is also auto-generated as part of `pnpm build`. ## Pre-Deployment Checklist 1. **Run tests** — `pnpm test` 2. **Check bundle size** — `pnpm bundlesize:test` 3. **Verify environment variables** — All required vars set in target environment 4. **Build successfully** — `pnpm build` completes without errors 5. **Verify SCAPI credentials** — Client ID and org ID match the target environment ## Troubleshooting | Issue | Cause | Solution | | ------------------------------ | ----------------------------- | ------------------------------------------- | | Build fails | TypeScript errors | Fix type errors; run `pnpm typecheck` | | Push rejected | Authentication issue | Verify sfnext CLI credentials | | 500 errors after deploy | Missing environment variables | Check all required vars in MRT dashboard | | Stale Page Designer components | Cartridge not deployed | Re-deploy cartridge via MCP tool or b2c CLI | ## Related Skills - `storefront-next:sfnext-project-setup` - Project structure and build configuration - `storefront-next:sfnext-configuration` - Environment variable configuration - `storefront-next:sfnext-page-designer` - Page Designer cartridge deployment - `storefront-next:sfnext-performance` - Bundle size optimization before deployment - `b2c-cli:b2c-mrt` - General MRT management via b2c CLI (NOT Storefront Next specific) ## Reference Documentation - [MRT Deployment Reference](references/MRT-DEPLOYMENT.md) - Detailed deployment options and configuration
Related in Cloud & DevOps
appbuilder-action-scaffolder
IncludedCreate, implement, deploy, and debug Adobe Runtime actions with consistent layout, validation, and error handling. Use this skill whenever the user needs to add actions to an App Builder project, understand action structure (params, response format, web/raw actions), configure actions in the manifest, use App Builder SDKs (State, Files, Events, database), deploy and invoke actions via CLI, debug action issues, or implement patterns such as webhook receivers, custom event providers, journaling consumers, large payload redirects, action sequence pipelines, and Asset Compute workers. Also trigger when users mention serverless functions in Adobe context, action logging, IMS authentication for actions, or cron-style scheduled actions.
orchestrating-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. Use this skill when the user needs a multi-step Data Cloud pipeline, cross-phase troubleshooting, or data space and data kit management. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase sf data360 workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching phase-specific skill), the task is STDM/session tracing/parquet telemetry (use observing-agentforce), standard CRM SOQL (use querying-soql), or Apex implementation (use generating-apex).
github-project-automation
IncludedAutomate GitHub repository setup with CI/CD workflows, issue templates, Dependabot, and CodeQL security scanning. Includes 12 production-tested workflows and prevents 18 errors: YAML syntax, action pinning, and configuration. Use when: setting up GitHub Actions CI/CD, creating issue/PR templates, enabling Dependabot or CodeQL scanning, deploying to Cloudflare Workers, implementing matrix testing, or troubleshooting YAML indentation, action version pinning, secrets syntax, runner versions, or CodeQL configuration. Keywords: github actions, github workflow, ci/cd, issue templates, pull request templates, dependabot, codeql, security scanning, yaml syntax, github automation, repository setup, workflow templates, github actions matrix, secrets management, branch protection, codeowners, github projects, continuous integration, continuous deployment, workflow syntax error, action version pinning, runner version, github context, yaml indentation error
sf-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase `sf data360` workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching sf-datacloud-* skill), the task is STDM/session tracing/parquet telemetry (use sf-ai-agentforce-observability), standard CRM SOQL (use sf-soql), or Apex implementation (use sf-apex).
fabric-cli
IncludedUse this skill for Fabric.so CLI workflows with the `fabric` terminal command: diagnose/install/login, search or browse a Fabric library, save notes/links/files, create folders, ask the Fabric AI assistant, manage tasks/workspaces, generate shell completion, check subscription usage, produce JSON output, and use Fabric as persistent agent memory. Do not use for Microsoft Fabric/Azure/Power BI `fab`, Daniel Miessler's Fabric framework, Python Fabric SSH, Fabric.js, or textile/fashion fabric.
lark
IncludedLark/Feishu CLI skills: lark-cli operations for docs, markdown, sheets, base, calendar, im, mail, task, okr, drive, wiki, slides, whiteboard, apps, approval, attendance, contact, vc, minutes, event. Use when the user needs to operate Lark/Feishu resources via lark-cli, send messages, manage documents, spreadsheets, calendars, tasks, OKRs, deploy web pages, or any Feishu/Lark workspace operations.