-
Notifications
You must be signed in to change notification settings - Fork 28
feat: use docgen-action for documentation generation #128
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
base: main
Are you sure you want to change the base?
Conversation
Adds a GitHub Actions workflow that uses leanprover-community/docgen-action to build and deploy documentation. Closes leanprover#121
|
Adding @fmontesi as reviewer since he setup these docs. |
|
I'm intentionally not approving the workflow to run yet so that this doesn't accidentally builds docs here, as this currently does so for PRs. |
- Remove pull_request trigger to prevent running on PRs - Remove cron schedule (superseded by push to main) - Remove duplicate toolchain verification (handled by docgen-action)
|
Where does this publish the docs, exactly? |
|
I think it targets the repo's GitHub pages by default, so something like |
|
@leodemoura @kim-em (CC @swaratchaudhuri @barrettcw): Could we somehow set this up to write to https://lean-lang.org/cslib/doc/api (in the spirit of https://lean-lang.org/doc/api)? |
Right, the idea was to take inspiration from Mathlib and publish the documentation to https://leanprover.github.io/cslib/docs using GitHub Pages, so we'd need to set that up. A somewhat more complex alternative would be to set up a separate docs repo like mathlib4_docs. |
|
We do have that for now, that's where the doc is currently produced. Check out the code at https://github.com/cs-lean/cs-lean.github.io. It outputs to https://cs-lean.github.io/ |
Shall we make a separate issue for this? |
|
Let me work on that with @kim-em since it would be nice to have the website and the API working in sync. |
|
@arademaker Just making sure you have seen this Zulip thread: https://leanprover.zulipchat.com/#narrow/channel/513188-CSLib/topic/documentation.20best.20practices/with/553824087 As @fmontesi and I agree there, it is desirable for all building of docs to happen in this repo. What I suggest is, exactly as is already done for Mathlib on the website, that we host the docs in this repo's GitHub pages and simply link to them. We merge this PR, check that it is building the docs, and update the website to link here. No extra coordination is needed and we can do this now. (Which would be nice, because I believe that currently the docs appear nowhere..) |
|
To make clear, as I wrote here, I agree to accept this PR. But first, we need to ask Lean Fro to add an exception to the rule that redirects all addresses under |
Thanks for the detailed reply! I didn't realize about the redirect rule, but it seems otherwise we're on the same page. |
Prevents the docgen-action from attempting to run Jekyll for homepage generation.
|
I noticed here that there is a check for if the |
|
I noticed that too, but this did not cause any trouble to the action, right? I am thinking if we would like to eventually have the folder in the repo to test/debug document generation locally. We can rename it to |
I think it stops building when it sees the directory, because that step only ran for one second and there is none of the output I would expect from the docs building. |
|
With that confirmed, my preference is to remove the |
|
There is a bib file in the docs that I can move to the website. I still don't have write permission in the repo, please go ahead and delete the folder. |
|
Good catch on the For now I've removed the |
I didn't know that. Maybe having it in "docbuild" is the solution? Let us see what people will say. |
Hmm, maybe. In the meantime I wouldn't consider this blocking, it just affects the rendering of a few links that we can follow up on. Is there anything else pending for this PR? |
Uses leanprover-community/docgen-action to build & deploy docs.
Closes #121