readthedocs / actions

GitHub Actions for Read the Docs
MIT License
33 stars 10 forks source link

Support for more than one project #9

Closed stsewd closed 2 years ago

stsewd commented 2 years ago

This is the case of our own repo https://github.com/readthedocs/readthedocs.org, where we have the docs and dev projects.

Currently, using the action more than once will override the previous comment

https://github.com/readthedocs/readthedocs-preview/blob/1029696f6a69477ff98e50ddb239e649f86ec384/action.yaml#L51

We should make the comment easier to locate, instead of using a plain ---- as separator, we could use a comment as a delimiter of the start/end of the comment. For example:

<!-- rtd-preview {project} start -->
Content
<!-- rtd-preview {project} end -->

That way, the current "separator" would be part of the template itself

---
:books: Documentation preview :books:: {docs-pr-index-url}
humitos commented 2 years ago

I liked the idea of using an HTML comment for this! 👍🏼

humitos commented 2 years ago

This done in c70557245b0ae077da1a8aeef7f259e88f2916f6

humitos commented 2 years ago

I tested it at https://github.com/readthedocs/sphinx-hoverxref/pull/220 and it worked.