From 951f4a6403201825ee069d8cf63bff48f7f5c336 Mon Sep 17 00:00:00 2001 From: Stefan Bratanov Date: Fri, 3 Mar 2023 07:48:40 +0000 Subject: [PATCH] Run deploy only if build is successful or it's a release event --- .github/workflows/deploy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 86e9d5c..ee4a643 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -11,6 +11,7 @@ on: jobs: deploy-jar: runs-on: ubuntu-latest + if: ${{ github.event_name == 'release' || github.event.workflow_run.conclusion == 'success' }} steps: - uses: actions/checkout@v3 - name: Set up JDK 17 @@ -46,6 +47,7 @@ jobs: sudo systemctl is-active sofia-supermarkets-api deploy-proxy: runs-on: ubuntu-latest + if: ${{ github.event_name == 'release' || github.event.workflow_run.conclusion == 'success' }} steps: - uses: actions/checkout@v3 - name: Publish worker to Cloudflare