Repository navigation
Commit bd1a2e3
authored
Skip the doc preview upload on fork PRs (pytorch#22943)
A fork PR reds "Build doc" after the docs have already built
successfully:
Upload documentation to S3 (if any)
##[error]Credentials could not be loaded, please check your action
inputs:
Could not load credentials from any providers
linux_job_v3 uploads whatever is left in RUNNER_DOCS_DIR to the
doc-previews
bucket, gated only on there being a pull request number. That upload
authenticates through OIDC, which a fork PR does not have, so it can
never
succeed. The preview was never going to publish; the only effect is that
the
docs build reports as broken.
Clears the directory on a fork PR so v3 skips the step. The docs still
build and
still upload to RUNNER_ARTIFACT_DIR, so the PR is validated exactly as
before,
and same-repo PRs and pushes are untouched.
The general fix belongs in linux_job_v3, whose condition should require
the pull
request to come from the same repository rather than merely to exist.
That would
fix this for every repo on v3 instead of one.
Authored with Claude Code.1 parent 3447ba9 commit bd1a2e3
1 file changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
100 | 112 | | |
101 | 113 | | |
102 | 114 | | |
| |||
0 commit comments