From 4294d4ba6deab3ccbf549b40d6feb36998c9437e Mon Sep 17 00:00:00 2001 From: Jalil Arfaoui Date: Thu, 18 Jul 2024 10:24:28 +0200 Subject: [PATCH] =?UTF-8?q?fix(ci):=20ne=20d=C3=A9ploie=20plus=20en=20deho?= =?UTF-8?q?rs=20des=20pull-requests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 9846a5a90..aa83c0c22 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -18,7 +18,7 @@ on: jobs: deploy-context: - if: github.event.pull_request.head.repo.full_name == github.repository + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository runs-on: ubuntu-22.04 outputs: env-name: ${{ steps.deploy-env.outputs.name }} @@ -38,7 +38,7 @@ jobs: build: needs: deploy-context - if: github.event.pull_request.head.repo.full_name == github.repository + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository env: API_BASE_URL: ${{ needs.deploy-context.outputs.api_url }} SERVER_BASE_URL: ${{ needs.deploy-context.outputs.server_url }} @@ -138,7 +138,7 @@ jobs: deploy-preview: needs: [build, build-storybook, deploy-context] runs-on: ubuntu-22.04 - if: github.event.pull_request.head.repo.full_name == github.repository && needs.deploy-context.outputs.env-name != 'master' + if: (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && needs.deploy-context.outputs.env-name != 'master' strategy: matrix: site: ['', 'en'] @@ -175,7 +175,7 @@ jobs: deploy-prod: needs: [build, build-storybook, deploy-context] runs-on: ubuntu-22.04 - if: github.event.pull_request.head.repo.full_name == github.repository && needs.deploy-context.outputs.env-name == 'master' + if: (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && needs.deploy-context.outputs.env-name == 'master' steps: - uses: actions/checkout@v3 - uses: actions/download-artifact@v3 @@ -235,7 +235,7 @@ jobs: runs-on: ubuntu-22.04 container: cypress/browsers:latest # We need to specify always() https://github.com/actions/runner/issues/491 - if: always() && github.event.pull_request.head.repo.full_name == github.repository && needs.deploy-preview.result == 'success' + if: always() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && needs.deploy-preview.result == 'success' needs: [deploy-context, deploy-preview] strategy: @@ -306,7 +306,7 @@ jobs: runs-on: ubuntu-22.04 container: cypress/browsers:latest # We need to specify always() https://github.com/actions/runner/issues/491 - if: always() && github.event.pull_request.head.repo.full_name == github.repository && needs.deploy-prod.result == 'success' + if: always() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && needs.deploy-prod.result == 'success' needs: [deploy-context, deploy-prod] strategy: