Sanity Library Reference Docs
    Preparing search index...
    • Declare a Workflows deployment in a sanity.blueprint.ts resources array. Supply the authored deployment accepted by defineWorkflowConfig, including a reviewed expectedMinReaderModel acknowledgement.

      parseWorkflowDeployment validates the deployment during manifest evaluation. A missing or insufficient acknowledgement, an invalid definition, or an unbound @<handle>: alias throws before submission to the Blueprints API.

      Parameters

      Returns WorkflowsResource

      The Blueprints service must support the sanity.workflow resource type before it can deploy the result. Until that support ships, deploy definitions with npx @sanity/workflow-cli deploy.

      Share the authored deployment object with defineWorkflowConfig. Its parsed config.deployments[n] output may have an unverified or missing acknowledgement and is not accepted as this function's typed input. Export the deployment by its own name from sanity.workflow.ts as well: the generated resources module and every generated function shell import it from that named export, and the resources module is emitted even for a deployment that needs no functions. The package README's "Declaring the resource" section shows the whole three-file layout.

      import {defineBlueprint} from '@sanity/blueprints'
      import {defineWorkflows} from '@sanity/workflow-blueprint'
      import {prod} from './shared'

      export default defineBlueprint({
      resources: [defineWorkflows(prod)],
      })