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

# Deployment

> Show a deployment's steps and status as your pipeline pushes updates, with links to the release and logs, cancel and retry.

> Reintersect apps are in developer preview. Names and limits can still change before general
> release.

To follow a deploy in a conversation, insert a deployment block when it starts and push each step's
status as your pipeline moves. Members can open the release and logs, or cancel and retry, from the
block.

```tsx src/app.ts theme={null}
import { createReintersectApp, defineMessageAction } from "@reintersect/sdk/app";
import { deployment } from "@reintersect/sdk/recipes";

export const Deploy = deployment({ type: "deploy", title: "Deployment" });

export const RecordProgress = defineMessageAction(
  "record-progress",
  { label: "Record progress", scopes: ["blocks:write"], blocks: { Deploy } },
  ({ message, reintersect, waitUntil }) => {
    waitUntil(
      reintersect.blocks.update(Deploy, message.text, {
        state: {
          status: "running",
          steps: [
            { label: "Build", state: "success" },
            { label: "Migrate", state: "running" },
            { label: "Release", state: "queued" },
          ],
        },
      }),
    );
    return { notice: "Progress recorded" };
  },
);

export const app = createReintersectApp({ name: "Deploys" })
  .addBlock(Deploy)
  .addMessageAction(RecordProgress);
```

The example pushes state from a message action. In a real app, the push usually comes from a
[route](/hosting/routes) your CI calls, using `reintersect.forInstall(installId)`.

## Props, state and actions

Props are `{ service, environment, version?, url?, logsUrl?, commitUrl? }`. State is
`{ status, steps, error? }`:

* `status`: `queued`, `running`, `success`, `failure` or `cancelled`.
* `steps`: `{ label, state, description? }[]`, where `state` is any
  [status state](/components/overview#shared-vocabulary).

| Action | Behaviour |
| - | - |
| `cancel` | Destructive. Marks the deployment and every step cancelled in the block's state. To stop the real pipeline too, wrap the exported `DeploymentView` in your own block with your own actions. |
| `retry` | Queues the deployment again: status and every step go back to `queued`. |

The first button in the block is the primary one, so the recipe orders the buttons by status: Retry
leads after a failure or a cancel, the release link once the deployment is live, and Logs while it
runs. Cancel is destructive, so it asks before it runs and can't be primary.

## Labels

`title`, `status`, `open`, `logs`, `commit`, `cancel`, `confirmTitle`, `confirmBody`, `retry`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.