From 6fedc4d06cc49c042e364bd12fc7f387ca64c5bb Mon Sep 17 00:00:00 2001 From: Ravi Srinivasan Date: Thu, 22 Feb 2024 16:52:03 +0530 Subject: [PATCH] fix to prevent GH pages publish step if PR is from a fork --- .github/workflows/pr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 75f43ff..3fee0ca 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -15,8 +15,6 @@ concurrency: pr-preview-${{ github.ref }} jobs: build: - # Do not run if PR is from fork - if: ${{ ! github.event.pull_request.head.repo.fork }} permissions: actions: write checks: write @@ -47,6 +45,8 @@ jobs: run: npm run build - name: Publish PR preview to GitHub Pages + # Do not run if PR is from fork + if: ${{ ! github.event.pull_request.head.repo.fork }} uses: rossjrw/pr-preview-action@v1 with: source-dir: ./build/site