From 7cd62de85f5229e44704f5c8b1ddea26d528e422 Mon Sep 17 00:00:00 2001 From: Sjoerd Beentjes <11621275+sjoerdbeentjes@users.noreply.github.com> Date: Fri, 4 Oct 2024 16:09:09 +0200 Subject: [PATCH] Fix workflows (#136) * Update workflows for main and staging branches * Update deployment config for workflows * Update staging-migrations workflow options * Update workflow names for clarity --- .github/workflows/main-migrations.yaml | 7 +++++-- .github/workflows/staging-migrations.yaml | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) 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 }}