From 4a433da45f292b40b5efc4e0c28527590134ac00 Mon Sep 17 00:00:00 2001 From: Christopher Tannum Date: Fri, 30 Jun 2023 12:57:19 +0200 Subject: [PATCH 1/2] fix: wrong conditional CI run for deploy doc --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 21cf14c01f6..f097356f761 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -314,6 +314,7 @@ jobs: yarn build:fast - name: Upload documentation artifact + if: ${{ contains(github.event.pull_request.labels.*.name, 'preview-docs') }} uses: actions/upload-artifact@v3 with: name: preview-docs @@ -321,7 +322,7 @@ jobs: deploy-preview-documentation: needs: [changes, build-preview-documentation] - if: ${{ needs.changes.outputs.should-run == 'true' || contains(github.event.pull_request.labels.*.name, 'preview-docs') }} + if: ${{ needs.changes.outputs.should-run == 'true' && contains(github.event.pull_request.labels.*.name, 'preview-docs') }} name: Publish documentation preview # Ensures that there only will be executed one "instance" of this operation # across all ongoing Github Action executions From a3f67a5a6d9cc442969cb194007cc1616599cc1b Mon Sep 17 00:00:00 2001 From: Christopher Tannum Date: Fri, 30 Jun 2023 13:49:15 +0200 Subject: [PATCH 2/2] fix: crashing when running from a push event --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f097356f761..acf2c257bc6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,11 +20,12 @@ jobs: permissions: pull-requests: read outputs: - should-run: ${{ steps.filter.outputs.should-run }} + should-run: ${{ github.event_name != 'pull_request' || steps.filter.outputs.should-run }} steps: # For pull requests it's not necessary to checkout the code - uses: dorny/paths-filter@v2 id: filter + if: ${{ github.event_name == 'pull_request' }} with: filters: | should-run: