diff --git a/.github/workflows/codeforafrica-deploy-review-app.yml b/.github/workflows/codeforafrica-deploy-review-app.yml index 5e96193c2..8304d9f2c 100644 --- a/.github/workflows/codeforafrica-deploy-review-app.yml +++ b/.github/workflows/codeforafrica-deploy-review-app.yml @@ -88,15 +88,12 @@ jobs: destroy_review_app: runs-on: ubuntu-latest - # only run when a pull request is closed - if: github.event.action == 'closed' + if: github.event_name == 'pull_request' && github.event.action == 'closed' steps: - - name: Destroy the review app + - name: Destroy review app uses: dokku/github-action@master with: - # destroy a review app command: review-apps:destroy - git_remote_url: ${{ env.DOKKU_REMOTE_URL }}/${{ env.APP_NAME }} - # specify a name for the review app + git_remote_url: ${{ env.DOKKU_REMOTE_URL }}/codeforafrica-ui review_app_name: ${{ env.APP_NAME }} ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}