From 31222a0657e7ac14b0dfd8a41741e689e0127b3f Mon Sep 17 00:00:00 2001 From: Guillermo Perez Date: Mon, 25 Mar 2024 18:17:27 +0100 Subject: [PATCH] change PR deployment behavior --- .github/workflows/dev-n-ffprod-deploys.yml | 26 ++++++++++++++++++++++ .github/workflows/main-branch-deploys.yml | 18 --------------- 2 files changed, 26 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/dev-n-ffprod-deploys.yml delete mode 100644 .github/workflows/main-branch-deploys.yml diff --git a/.github/workflows/dev-n-ffprod-deploys.yml b/.github/workflows/dev-n-ffprod-deploys.yml new file mode 100644 index 0000000000..ce25cb3365 --- /dev/null +++ b/.github/workflows/dev-n-ffprod-deploys.yml @@ -0,0 +1,26 @@ +name: dev-n-ffprod-deploys +on: + push: + branches: main + pull_request: + # paths: + # - '.github/workflows/main-branch-deploys.yml' + +jobs: + main_branch: + if: github.ref == 'refs/heads/main' + name: deploy-${{ matrix.env }} + strategy: + matrix: + env: ['ff-prod', 'development'] + uses: ./.github/workflows/deploy_all.yml + secrets: inherit + with: + environment: ${{ matrix.env }} + + pull_request: + if: github.event_name == 'pull_request' + uses: ./.github/workflows/deploy_all.yml + secrets: inherit + with: + environment: 'ff-prod' \ No newline at end of file diff --git a/.github/workflows/main-branch-deploys.yml b/.github/workflows/main-branch-deploys.yml deleted file mode 100644 index 077720528c..0000000000 --- a/.github/workflows/main-branch-deploys.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: deploy-main -on: - push: - branches: main - pull_request: - paths: - - '.github/workflows/main-branch-deploys.yml' - -jobs: - trigger: - name: deploy-${{ matrix.env }} - strategy: - matrix: - env: ['ff-prod', 'development'] - uses: ./.github/workflows/deploy_all.yml - secrets: inherit - with: - environment: ${{ matrix.env }} \ No newline at end of file