File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Cleanup Neon preview branch
2+
3+ # The Neon<->Vercel integration creates a `preview/<git-branch>` database branch
4+ # for each apps/cms preview deployment but never removes it. Delete it as soon as
5+ # the PR is closed (merged or not) so stale branches don't accumulate storage costs.
6+ on :
7+ pull_request :
8+ types : [closed]
9+
10+ permissions : {}
11+
12+ jobs :
13+ delete-branch :
14+ name : Delete preview/${{ github.head_ref }}
15+ runs-on : ubuntu-latest
16+ # Fork PRs get no Neon preview branch and cannot read repository secrets.
17+ if : github.event.pull_request.head.repo.full_name == github.repository
18+ steps :
19+ - uses : neondatabase/delete-branch-action@v3
20+ with :
21+ project_id : ${{ secrets.NEON_PROJECT_ID }}
22+ branch : preview/${{ github.head_ref }}
23+ api_key : ${{ secrets.NEON_API_KEY }}
You can’t perform that action at this time.
0 commit comments