From 8d52a2e3ea50c725d2b14a1fbe1b212a0670f691 Mon Sep 17 00:00:00 2001 From: Aaron Crawfis Date: Tue, 1 Aug 2023 18:04:53 -0700 Subject: [PATCH] Add conditional for comment steps --- .github/workflows/website.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/website.yaml b/.github/workflows/website.yaml index 76eaafbd8..bee206f27 100644 --- a/.github/workflows/website.yaml +++ b/.github/workflows/website.yaml @@ -153,13 +153,14 @@ jobs: - name: Find SWA Comment uses: peter-evans/find-comment@v2 id: fc + if: github.event_name == 'pull_request' with: issue-number: ${{ github.event.pull_request.number }} comment-author: 'github-actions[bot]' body-includes: 'Azure Static Web Apps:' direction: last - name: Update SWA Comment - if: steps.fc.outputs.comment-id != '' + if: github.event_name == 'pull_request' && steps.fc.outputs.comment-id != '' uses: peter-evans/create-or-update-comment@v3 with: comment-id: ${{ steps.fc.outputs.comment-id }}