From 54b5a6d32f2a629a172383e2a30d4d000c569533 Mon Sep 17 00:00:00 2001 From: Michael Vorburger Date: Thu, 2 Nov 2023 05:37:14 +0100 Subject: [PATCH 1/3] Document skipping build for closed PR on README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 562dacd..83455a7 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,8 @@ jobs: uses: actions/checkout@v3 - name: Install and Build + # Skipping build if the PR has been closed + if: ${{ github.event.action != 'closed' }} run: | npm install npm run build From 9d5788d3822d5c7cf9afc97f46bf2466d740c95b Mon Sep 17 00:00:00 2001 From: Ross Williams Date: Fri, 22 Dec 2023 12:37:21 +0000 Subject: [PATCH 2/3] Tweak conditional comment --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 83455a7..0172048 100644 --- a/README.md +++ b/README.md @@ -78,8 +78,7 @@ jobs: uses: actions/checkout@v3 - name: Install and Build - # Skipping build if the PR has been closed - if: ${{ github.event.action != 'closed' }} + if: github.event.action != 'closed' # You might want to skip the build if the PR has been closed run: | npm install npm run build From 1574bfc57ea1c862979a34ed4b9fb8181aa107e1 Mon Sep 17 00:00:00 2001 From: Ross Williams Date: Fri, 22 Dec 2023 12:38:28 +0000 Subject: [PATCH 3/3] Add build condition to other example --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0172048..215f872 100644 --- a/README.md +++ b/README.md @@ -285,6 +285,7 @@ jobs: steps: - uses: actions/checkout@v3 - run: npm i && npm run build + if: github.event.action != 'closed' - uses: rossjrw/pr-preview-action@v1 with: source-dir: .