Skip to content

Commit

Permalink
Do not publish live previews for PRs from forks
Browse files Browse the repository at this point in the history
We can only publish PR previews from the original repository. The action
fails when the PR originates from a forked repository. For details, see
rossjrw/pr-preview-action#3.
  • Loading branch information
robmoss committed Nov 2, 2022
1 parent 790d0fb commit 9e9a70b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ jobs:
run: |
mdbook build
# NOTE: we can only deploy PR previews from the original repository.
# This action fails when the PR originates from a forked repository;
# see https://github.com/rossjrw/pr-preview-action/issues/3 for details.
- name: Deploy preview
if: github.event.pull_request.head.repo.full_name == github.repository
uses: rossjrw/pr-preview-action@v1
with:
force: false
Expand Down

0 comments on commit 9e9a70b

Please sign in to comment.