fix: エラー時に loading フラグがリセットされない問題を修正 #13
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Cleanup Preview Environment | |
| on: | |
| pull_request: | |
| types: [closed] | |
| permissions: | |
| contents: read | |
| jobs: | |
| cleanup-preview: | |
| runs-on: ubuntu-latest | |
| env: | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup PNPM | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Delete Preview API Worker | |
| working-directory: apps/api | |
| run: | | |
| WORKER_NAME="tabitabi-api-preview-pr-${PR_NUMBER}" | |
| pnpm wrangler delete --name "${WORKER_NAME}" || echo "Worker may not exist" | |
| continue-on-error: true | |
| - name: Cleanup Pages preview deployments | |
| run: | | |
| echo "Pages preview deployments are automatically managed by Cloudflare" | |
| echo "No manual cleanup needed for PR ${PR_NUMBER}" |