Fix doc-preview S3 path for workflow_dispatch runs#3688
Conversation
When triggered via `workflow_dispatch`, the `s3-prefix`
was resolving to `pytorch/ao/`(empty string),
causing files to upload to `pytorch/ao//index.html` (double slash).
This made the preview inaccessible since the URL path didn't match.
Fix: Use `github.run_id` as fallback when PR number is
unavailable, ensuring a valid path like
`pytorch/ao/{run_id}/index.html`.
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/3688
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 243f8cf with merge base 2a8714f ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
let's test with manual run, seems the doc is not generated here by default (which is expected I guess) |
📄 Doc Preview (workflow_dispatch)You triggered a doc build manually via workflow_dispatch. Use this link instead: https://docs-preview.pytorch.org/pytorch/ao/21261536097/index.html |
📄 Doc Preview (workflow_dispatch)You triggered a doc build manually via workflow_dispatch. Use this link instead: https://docs-preview.pytorch.org/pytorch/ao/21262643383/index.html |
When triggered via
workflow_dispatch, thes3-prefixwas resolving topytorch/ao/{empty string},causing files to upload to
pytorch/ao//index.html(double slash). This made the preview inaccessible since the URL path didn't match.Fix: Use
github.run_idas fallback when PR number is unavailable, ensuring a valid path likepytorch/ao/{run_id}/index.html.