---
name: local/deploy-to-staging
description: Deploy the current branch to the staging environment.
version: 1.0.0
steps:
  - Verify all tests pass locally
  - Confirm the branch is up to date with the remote
  - Push the branch to the remote repository
  - Trigger the CI pipeline and wait for it to pass
  - Run the deployment script from scripts/deploy.py
  - Verify the deployment using the health check in references/runbook.md
  - Notify the team via the configured notification channel
  - Monitor logs for the first 5 minutes after deployment
metadata:
  author: example
  environment: staging
allowed-tools:
  - builtin/shell
  - builtin/git-status
---
# Deploy to Staging

Follow these steps to deploy the current branch to staging.

## Pre-flight Checks

1. Verify all tests pass locally using `builtin/shell`.
2. Confirm the branch is up to date with `builtin/git-status`.

## Deployment Steps

3. Push the branch to the remote repository.
4. Trigger the CI pipeline and wait for it to pass.
5. Run the deployment script from `scripts/deploy.py`.
6. Verify the deployment using the health check reference in `references/runbook.md`.

## Post-deployment

7. Notify the team via the configured notification channel.
8. Monitor logs for the first 5 minutes after deployment.
