From 1ad28632f14a8490af4ba94ad05a5d2f30cc006a Mon Sep 17 00:00:00 2001 From: DONFN Date: Wed, 14 Feb 2024 11:21:05 +0200 Subject: [PATCH] Refactor deployment workflows for different branches - Update the branch filter in `.github/workflows/deploy-to-cb.yml` to only trigger on the `dev` branch. - Update the branch filter in `.github/workflows/deploy-to-heroku.yml` to only trigger on the `master` branch. - Modify the matrix of app names in both workflows. These changes ensure that deployments are triggered correctly based on the respective branches. --- .github/workflows/deploy-to-cb.yml | 6 ++++-- .github/workflows/deploy-to-heroku.yml | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy-to-cb.yml b/.github/workflows/deploy-to-cb.yml index cdd11ba..421f62f 100644 --- a/.github/workflows/deploy-to-cb.yml +++ b/.github/workflows/deploy-to-cb.yml @@ -1,7 +1,9 @@ name: Deploy to Heroku on: - push: ["main"] + push: + branches: + - dev workflow_dispatch: jobs: @@ -9,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - app_name: ['unistudents-prod-1', 'unistudents-prod-4', 'unistudents-prod-5', 'unistudents-prod-6'] + app_name: [ 'unistudents-uat' ] steps: - name: Checkout uses: actions/checkout@v2 diff --git a/.github/workflows/deploy-to-heroku.yml b/.github/workflows/deploy-to-heroku.yml index 24d5f48..b3563f0 100644 --- a/.github/workflows/deploy-to-heroku.yml +++ b/.github/workflows/deploy-to-heroku.yml @@ -1,7 +1,9 @@ name: Deploy to Heroku on: - push: ["dev"] + push: + branches: + - master workflow_dispatch: jobs: @@ -9,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - app_name: ['unistudents-uat'] + app_name: ['unistudents-prod-1', 'unistudents-prod-4', 'unistudents-prod-5', 'unistudents-prod-6'] steps: - name: Checkout uses: actions/checkout@v2