> ## Documentation Index
> Fetch the complete documentation index at: https://docs.withcortex.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Deploy

> Learn how to deploy workflows, manage versions, rollback changes, and compare different versions of your workflows.

Deploy creates a versioned release of your workflow that can be used in Cortex Rules and accessed via API.

<img
  src="https://mintcdn.com/cortex-891fd898/4MLfFrvXy66YjKyF/assets/workflows/deploy/deploy-workflow.png?fit=max&auto=format&n=4MLfFrvXy66YjKyF&q=85&s=b0e3363de35b8d7bbcf9b1fe077bede8"
  alt="Deploying a Workflow"
  style={{
borderRadius: '10px',
}}
  width="1226"
  height="726"
  data-path="assets/workflows/deploy/deploy-workflow.png"
/>

1. Click the `Deploy` button in the top-right corner of the workflow builder
2. In the deploy modal:
   * Enter optional release notes to document changes
   * Click `Deploy Now` to create the new version
3. The workflow will be deployed as a new version, overwriting the latest version
4. Previous versions remain accessible for rollback or reference

<Note>
  You can still access previous versions by specifying the version number or
  rolling back to an earlier version if needed.
</Note>

## Versions

The Versions page shows the complete version history of your workflow.

<img
  src="https://mintcdn.com/cortex-891fd898/4MLfFrvXy66YjKyF/assets/workflows/deploy/version-history-option.png?fit=max&auto=format&n=4MLfFrvXy66YjKyF&q=85&s=0536ead1aea06a847495636e7ad1e8ad"
  alt="Workflow Versions"
  style={{
borderRadius: '10px',
}}
  width="1372"
  height="772"
  data-path="assets/workflows/deploy/version-history-option.png"
/>

* Version ID: Unique identifier for each version
* Version number (v1, v2, etc.)
* Release notes
* Deployment timestamp
* User who deployed the version

### Version Actions

Each version has three action buttons:

<img src="https://mintcdn.com/cortex-891fd898/4MLfFrvXy66YjKyF/assets/workflows/deploy/version-actions.png?fit=max&auto=format&n=4MLfFrvXy66YjKyF&q=85&s=a98ca2e1e671d0df53c2b030d9b90fac" alt="Workflow Version Actions" style={{ borderRadius: '10px' }} width="1760" height="962" data-path="assets/workflows/deploy/version-actions.png" />

1. **Clone Version**: Creates a copy of that specific version
2. **Rollback**: Reverts to that version (overwrites latest)
3. **Compare**: Compare this version with current workflow

### Viewing Version Details

Click on a version in the Versions list to view its details:

* Complete workflow configuration
* UI view of the workflow at time of deployment
* JSON schema of the workflow

## Rollback Version

Rollback allows you to revert to a previous version of your workflow.

### How to Rollback

1. In the Versions list, find the version you want to rollback to
2. Click the rollback icon (circular arrow)
3. In the rollback modal:
   * Review the warning message
   * Add optional release notes
   * Click "Rollback Now"
4. The selected version becomes the new latest version

## Compare Versions

Compare Versions helps you understand differences between workflow versions.

<img src="https://mintcdn.com/cortex-891fd898/4MLfFrvXy66YjKyF/assets/workflows/deploy/compare-versions-option.png?fit=max&auto=format&n=4MLfFrvXy66YjKyF&q=85&s=3215fba173ec21a0e3caaf120d50b46c" alt="Compare Versions" style={{ borderRadius: '10px' }} width="1214" height="674" data-path="assets/workflows/deploy/compare-versions-option.png" />

### Comparison Options

1. **UI Compare**: Visual comparison of workflow layouts
2. **Schema Compare**: Side-by-side JSON schema comparison
3. **View Options**:
   * Side by Side: Shows versions in parallel
   * Smart Diff: Highlights specific changes between versions

### How to Compare

1. Access comparison in two ways:
   * Click the compare icon on any version in the Versions list
   * Select "Compare Versions" from the workflow menu
2. Select versions to compare:
   * Left side: Earlier version
   * Right side: Later version or current draft

This versioning system provides complete workflow history tracking and the flexibility to manage changes effectively through deployment, rollback, and comparison features.
