You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Finding the correct link to the ReadTheDocs preview is hidden inside the Checks UI, and attention is only drawn to it if it fails.
Proposed Solution
Add a workflow that posts a PR comment with a badge. Bonus: have the badge update with the status of the build.
Additional context
name: RTD Previewon:
pull_request_target:
types: [opened]permissions:
pull-requests: writejobs:
binder:
runs-on: ubuntu-lateststeps:
- name: Comment on the PR with the RTD previewuses: actions/github-script@v6with:
github-token: ${{ secrets.GITHUB_TOKEN }}script: | var PR_NUMBER = context.issue.number github.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, body: `[![readthedocs](NEED-A-BADGE.svg)](https://lumino--${PR_NUMBER}.org.readthedocs.build/en/${PR_NUMBER}) :point_left: Try it on ReadTheDocs` })
Ideally, there would be an RTD status badge for this specific PR, but this isn't supported yet. A sorta-ghetto approach would be to summon the logo, a la:
![the logo](https://lumino--633.org.readthedocs.build/en/633/_static/jupyter_logo.svg "the docs built once")
yielding
This would be broken if the docs never built once, but then there would be little to distinguish it if a successive build broke it. But github caches all this stuff, so maybe it's not worth it if it ever looks broken when its not.
The text was updated successfully, but these errors were encountered:
References
Problem
Finding the correct link to the ReadTheDocs preview is hidden inside the Checks UI, and attention is only drawn to it if it fails.
Proposed Solution
Add a workflow that posts a PR comment with a badge. Bonus: have the badge update with the status of the build.
Additional context
Ideally, there would be an RTD status badge for this specific PR, but this isn't supported yet. A sorta-ghetto approach would be to summon the logo, a la:
yielding
This would be broken if the docs never built once, but then there would be little to distinguish it if a successive build broke it. But github caches all this stuff, so maybe it's not worth it if it ever looks broken when its not.
The text was updated successfully, but these errors were encountered: