-
-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate docs.stackstorm.com to GH static pages #1096
Comments
I think rtfd.io (readthedocs.org) would be ideal for docs.stackstorm.com as they already have the infra to deal with sphinx. Using a CNAME record we can continue using docs.stackstorm.com as well. |
readthedocs.org is really nice, but it's still 3rd party service that will require another new set of credentials and deployment. With security in mind, what git + GH static pages provide us is native integration and transparency. The entire pipeline doesn't escape Github and everyone can track if the docs.stackstorm.com state is indeed in sync and not modified in the middle or something. |
Credentials management is easier than I thought it would be with ReadTheDocs. It supports login with github, so we don't need any new passwords to manage this. As an experiment, I added @st2stanley as an admin of the st2docs project. I asked in the readthedocs/community chat about automatically giving a Github Team maintainer rights for a project, and they said:
In the meantime if having @st2stanley as an admin is not enough, we can also add whatever TSC member needs to work on the project. And if we need it to be automated, I can write a GHA workflow that will periodically sync a senior maintainer team (which I don't think we have) from github to RTD. After adding @st2stanley, I tested building docs with the rtd branch of st2docs. In poking around I noticed that we are using an ancient version of the
So, I did the following:
Check out an example page: https://st2docs.readthedocs.io/en/rtd/install/u18.html I believe there are only three StackStorm customizations that I haven't ported:
One gotcha is that this has the same issue as #1129 in that _edit: RTD redirects are more powerful than I thought, so implementing the redirects is fairly simple. See #1096 (comment) _ So, please check out: https://st2docs.readthedocs.io/en/rtd/ What does everyone think? Can we go in this direction? One of the features I really want is pull request builds: |
I took at the look at the generated pages. One thing I noticed is that the multi-level headings are handled differently, compare: Looks like our current docs only go down a couple of levels in the tree, but the RTD goes down to more levels which is nice. Looking at the history the main concern was introducing another 3rd party service, rather than hosting natively with GitHub. Though I read it's free hosting for open-source, so addresses the cost reduction exercise. |
Yes, the newer version of the theme has some new bells and whistles. Scrolling is also nicer because the menu can scroll separately from the main content. I think we can use the newer version of the theme wherever we host the pages, but I've only tested it on RTD where some additional things get injected during the build (I don't think I'm relying on the injected bits, but we'd need to test). |
Thanks, @cognifloyd for trying it! Really helpful to have an example 👍 The diff key points to me:
With that, |
@cognifloyd Speaking of Preview & Security, why not have both? |
fixed the width. I'll submit a PR that just updates to the new theme. |
Well that was easier to fix than I thought. RTD has a "redirects" feature that allows you to configure redirects that happens if a url would return a 404 (ie /bla.html instead of /en/3.7/bla.html). I just set up these redirects: So all current urls should work on RTD. Also, I found that we can have a version of the docs that RTD builds without getting included in the versions menu (active and hidden). Whether we switch to RTD or gh-pages, we need a way to build old versions of the docs too. We currently have ALL old versions. So there could be old links we need to preserve. |
Currently, https://docs.stackstorm.com/ are deployed to AWS S3 on every build.
Migrating to native GH static pages unties docs from AWS and would improve the transparency via git, security, and maintenance.
We had a good experience with Github Static pages as a great alternative so far where additional infra would be redundant.
Depends on #1095
Relevant story for apidocs: StackStorm/st2apidocs#16
The text was updated successfully, but these errors were encountered: