diff --git a/.github/workflows/preview-build.yml b/.github/workflows/preview-build.yml index e477c5a72..4e7cac6d1 100644 --- a/.github/workflows/preview-build.yml +++ b/.github/workflows/preview-build.yml @@ -45,6 +45,7 @@ permissions: jobs: build: + if: github.event.repository.fork == false # Skip running the job on the fork itself (It still runs on PRs on the upstream from forks) concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.head.ref || github.ref }} cancel-in-progress: ${{ startsWith(github.event_name, 'pull_request') }} diff --git a/.github/workflows/preview-cleanup.yml b/.github/workflows/preview-cleanup.yml index 105387b75..5de5333cf 100644 --- a/.github/workflows/preview-cleanup.yml +++ b/.github/workflows/preview-cleanup.yml @@ -12,6 +12,7 @@ permissions: jobs: destroy: + if: github.event.repository.fork == false # Skip running the job on the fork itself (It still runs on PRs on the upstream from forks) runs-on: ubuntu-latest steps: - name: Delete GitHub environment @@ -53,4 +54,4 @@ jobs: aws s3 rm "s3://elastic-docs-v3-website-preview/${GITHUB_REPOSITORY}/pull/${PR_NUMBER}" --recursive - name: 'Update Reference Index' - uses: elastic/docs-builder/actions/update-reference-index@main \ No newline at end of file + uses: elastic/docs-builder/actions/update-reference-index@main