Skip to content

Commit 3d7fca7

Browse files
committed
ci: skip GH Pages publish from fork PRs
1 parent ab60931 commit 3d7fca7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ jobs:
9090
preview:
9191
runs-on: ubuntu-latest
9292
needs: build
93-
if: ${{ needs.build.outputs.any-workspace == 'true' }}
93+
# Skip publishing to GH Pages if nothing changed or if this PR is coming from a fork
94+
# See also https://github.com/orgs/community/discussions/26829#discussioncomment-3253575
95+
if: ${{ (needs.build.outputs.any-workspace == 'true') && ( github.event.pull_request.head.repo.full_name == github.repository ) }}
9496
name: Publish preview playgrounds to GH Pages
9597
steps:
9698
- name: Determine GitHub Pages directory name

0 commit comments

Comments
 (0)