This repo gives an example and explains how to write and publish the documentation of a code with Reathedocs. You'll notice that this tutorial is itself built using Readthedocs and you can see the rendered pages at the link below.
>>Get started! Access the tutorial on readthedocs here>> https://my-docs-online.readthedocs.io/en/latest/build_documentation.html
The tutorial is for the case you don't wish to share the code itself nor its internal documentation (like the code docstrings) but you only want to publish an external documentation about it. In case you want to share a documentation and the code itself, and if your code is in Python, documented with nice docstrings, you can have a look at this other tutorial instead.