Closed victorporof closed 6 years ago
Thanks @fluffyemily! Yeah, the plan is to generate other docs on CI in this manner as well, and push from CI back into the gh-pages like in this PR.
Will be looking into https://github.com/mozilla/mentat/pull/765 next.
We’ll likely want a different index however, likely what’s in the docs directory right now, linking to the appropriate generated documentation, but also including our tutorials, getting started guides etc.
Thanks for the quick review. Landing.
Signed-off-by: Victor Porof victor.porof@gmail.com
A very simple start for generating documentation automatically.
Here's how it looks like: https://victorporof.github.io/mentat When this PR is merged, this link will also point to the rust API documentation: https://mozilla.github.io/mentat
The
gh-pages
branch would look like this: https://github.com/victorporof/mentat/tree/gh-pagesThis PR implements the following:
cargo doc
to generate documentation.index.html
entry-point for the projects'sgh-pages
website that redirects to the generated documentation for the top-level mentat crate.gh-pages
branch, overwriting everything that was previously there.A link to the documentation is also added to the README.
The importing of the generated documentation into the
gh-pages
branch is done with a very simple ghp-import python script that I came across. In the long term, it's likely that we'll want to roll out our own, especially since we want to provide more than just Rust API documentation. However I think this is fine for now.I've added a GitHub token for allowing pushing to the repo from the CI machine: https://travis-ci.org/mozilla/mentat/settings It follows the recommendations from https://docs.travis-ci.com/user/deployment/pages/#Setting-the-GitHub-token