Skip to content

Commit

Permalink
Merge pull request #51 from SVendittelli/ci/preview
Browse files Browse the repository at this point in the history
Delete vercel preview after PR closed
  • Loading branch information
SVendittelli authored Nov 23, 2023
2 parents c9c0399 + 8ab42de commit 03efc08
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Preview Environment

env:
VERCEL_ACCESS_TOKEN: ${{ secrets.VERCEL_ACCESS_TOKEN }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}

on:
pull_request:
types: [opened, synchronize, closed]
branches:
- main

jobs:
deploy:
if: ${{ github.event.action == 'opened' || github.event.action == 'synchronize' }}
runs-on: ubuntu-latest
steps:
- uses: snaplet/[email protected]
delete:
if: ${{ github.event.action == 'closed' }}
runs-on: ubuntu-latest
steps:
- uses: snaplet/[email protected]
with:
delete: true

0 comments on commit 03efc08

Please sign in to comment.