From 31b43b537f526c688f6c0214484e8910a24babc3 Mon Sep 17 00:00:00 2001 From: Marius Unger Date: Mon, 30 Sep 2024 16:15:47 +0200 Subject: [PATCH] * fix workflow to deploy only when PR is merged into main branch --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5652464..ec1a18b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,10 +55,10 @@ jobs: deploy: # only deploy when PR has been merged to main branch & build job was successfully finished - if: github.event.pull_request.merged == true needs: build - runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' + steps: # Deploy recent build and push it to branch 'gh-pages' # this will trigger the action 'pages build & deployment' to host the recent build