canonical / real-time-ubuntu-docs

Real-time Ubuntu documentation
https://documentation.ubuntu.com/real-time
1 stars 2 forks source link

Automatically add link to RTD preview on PRs #12

Closed farshidtz closed 4 months ago

farshidtz commented 7 months ago

For example, the URL for PR10 is expected to be https://canonical-real-time-ubuntu-documentation--10.com.readthedocs.build/

I've seen this done in some external projects. Not sure if RDT has a mechanism to inject this inside the PR description or as a comment. Alternatively, it could be done via a Github workflow.

farshidtz commented 4 months ago

@AnneCYH is this something the @canonical/documentation team may add to the starter kit?

AnneCYH commented 4 months ago

@AnneCYH is this something the @canonical/documentation team may add to the starter kit?

Hey @farshidtz , I can take a look and see what can be done first. If RTD itself doesn't have that capability, I think GitHub Actions is likely doable.

And yes depending on how this turns out, we can add it to the starter kit if it is useful for everyone.

AnneCYH commented 4 months ago

hi @farshidtz ,

I checked the settings for this repository and it appears the link to the built docs for each PR are already available: image

You have to see the "checks" section, click on "View details" and click on "Details" for the readthedocs entry, which takes you to the rendered docs. Used this PR https://github.com/canonical/real-time-ubuntu-docs/pull/24 as a reference.

Is this sufficient?

Thanks.

SecondSkoll commented 4 months ago

As Anne mentioned, if you expand the documentation checks and click details on the docs/readthedoc.com:* check, it will take you to a preview. It's relatively obscure, unfortunately.

farshidtz commented 4 months ago

Thank you, @AnneCYH and @SecondSkoll, for pointing that out!

FYI @canonical/industrial, @EdoardoBarbieriCanonical; see https://github.com/canonical/real-time-ubuntu-docs/issues/12#issuecomment-2109724260