> For AI agents: the complete documentation index is available at /ja/llms.txt, the full documentation bundle is available at /ja/llms-full.txt.

# `cleanup-deployment`

`true`にすると、削除したGitHubブランチに紐づくVercelの[Deployment](https://vercel.com/docs/glossary#deployment)を削除します。デフォルトは**false**です。

::: warning
`delete`イベントをトリガーとするWorkflowで有効なオプションです。`delete`イベント以外ではこのオプションがtrueでも動作しません。
:::

## 使用例

```yaml {18} file="/snippets/cleanup-workflow.yml"
name: Cleanup Vercel deployments

on:
  delete:

jobs:
  cleanup:
    if: ${{ github.event.ref_type == 'branch' }}
    name: Cleanup deployments
    runs-on: ubuntu-latest

    steps:
      - uses: nexterias/actions-vercel@v2
        with:
          token: ${{ secrets.VERCEL_TOKEN }}
          org-id: ${{ secrets.VERCEL_ORG_ID }}
          project-id: ${{ secrets.VERCEL_PROJECT_ID }}
          cleanup-deployment: true

```
