diff --git a/.github/workflows/main-migrations.yaml b/.github/workflows/main-migrations.yaml index 86f60d5a..692f76d8 100644 --- a/.github/workflows/main-migrations.yaml +++ b/.github/workflows/main-migrations.yaml @@ -1,8 +1,11 @@ -name: Deploy production +name: Deploy to production on: pull_request: types: [closed] + push: + branches: + - main jobs: apply-main-migrations: @@ -44,6 +47,7 @@ jobs: run: npm run migrations:apply-main prepare: + needs: apply-main-migrations runs-on: ubuntu-latest outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} @@ -105,7 +109,6 @@ jobs: publish-dir: "./dist" production-branch: main github-token: ${{ secrets.GITHUB_TOKEN }} - deploy-message: Production deployment for ${{ matrix.name }} env: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ matrix.netlifySiteId }} diff --git a/.github/workflows/staging-migrations.yaml b/.github/workflows/staging-migrations.yaml index 0a6e35a5..06c420c6 100644 --- a/.github/workflows/staging-migrations.yaml +++ b/.github/workflows/staging-migrations.yaml @@ -1,4 +1,4 @@ -name: Deploy staging +name: Deploy to staging on: pull_request: @@ -45,6 +45,7 @@ jobs: run: npm run migrations:apply-staging prepare: + needs: apply-staging-migrations runs-on: ubuntu-latest outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} @@ -106,7 +107,9 @@ jobs: publish-dir: "./dist" production-branch: main github-token: ${{ secrets.GITHUB_TOKEN }} - deploy-message: Preview deployment for ${{ matrix.name }} + enable-commit-comment: false + enable-pull-request-comment: true + overwrites-pull-request-comment: true env: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ matrix.netlifySiteId }}