diff --git a/.github/workflows/staging-deploy.yml b/.github/workflows/staging-deploy.yml index 78cf10a9..28ba83cd 100644 --- a/.github/workflows/staging-deploy.yml +++ b/.github/workflows/staging-deploy.yml @@ -2,10 +2,15 @@ name: Staging Deployment on: pull_request_target: - types: [opened, reopened, synchronize] + types: [opened, reopened, synchronize, closed] jobs: deploy: + # if the PR is merged, don't run the deployment + if: github.event.pull_request.merged != true + concurrency: + group: staging-${{ github.event.pull_request.number }} + cancel-in-progress: true runs-on: ubuntu-latest environment: staging steps: