Commit 36c70ba
ci(docs-preview): skip publish/comment steps on fork PRs
The docs-preview workflow runs on `pull_request`, where a fork's
GITHUB_TOKEN is read-only. The "Comment on PR with preview link" step then
fails with "Resource not accessible by integration", turning the check red
on every external contributor's PR even though the MkDocs build succeeded.
Guard the two write-requiring steps (www publish, PR comment) with
`if: github.event.pull_request.head.repo.full_name == github.repository`.
Fork PRs still run the build that validates the docs but skip the steps
needing write access, so the check stays green; internal branches publish
the preview as before.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent f3c42cb commit 36c70ba
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
53 | 57 | | |
| 58 | + | |
54 | 59 | | |
55 | 60 | | |
56 | 61 | | |
| |||
62 | 67 | | |
63 | 68 | | |
64 | 69 | | |
| 70 | + | |
65 | 71 | | |
66 | 72 | | |
67 | 73 | | |
| |||
0 commit comments