diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 027ba1d2..4d76a997 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -64,7 +64,10 @@ jobs: - name: Publish PR docs in a subdirectory # runs when a PR is opened or updated, but not when merged into main - if: github.event_name == 'pull_request' && github.base_ref == 'main' + if: >- + github.event_name == 'pull_request' && + github.base_ref == 'main' && + github.event.pull_request.head.repo.full_name == github.repository uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} @@ -73,7 +76,10 @@ jobs: - name: Create comment # runs when a PR is opened or updated, but not when merged into main - if: github.event_name == 'pull_request' && github.base_ref == 'main' + if: >- + github.event_name == 'pull_request' && + github.base_ref == 'main' && + github.event.pull_request.head.repo.full_name == github.repository uses: marocchino/sticky-pull-request-comment@v2 with: header: "Documentation Website"