-
Notifications
You must be signed in to change notification settings - Fork 184
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
ci: Generate docs for each PR #2547
Conversation
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/2547/docs/iroh/ Last updated: 2024-07-26T12:59:33Z |
I think this isn't far from working, but I think someone with more access rights than I have needs to setup github pages in the settings for this to work. |
The link is a 404 now, is that expected? How long do they stay valid? |
@flub see my msg above: #2547 (comment) This doesn't work yet :( Need an admin to jump in. |
oops, missed that. but do they stay valid forever? will we ever run out of space? |
IIUC, the github action will push to a branch (that's My plan was for the github action to publish different PRs to different directories on that branch, indexed by PR number. We'd have one directory for each PR. We can go in there by hand and remove old PRs. From reading the github documentation, I don't see any limits to repository size, though. |
I guess if it's just a repo than we have unlimited storage and can as well leave it there. it's nicer that it doesn't expire. just surprises me they are that generous :) |
You can see what this PR generates here: https://github.com/n0-computer/iroh/tree/generated-docs-preview It just needs to be hosted now. |
This reverts commit 0206c26.
Forgot to mention this now just works (thus I flipped it to ready for review). The comment above is a demo of it working: #2547 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but please follow up on the two comments before merging
## Description <!-- A summary of what this pull request achieves and a rough list of changes. --> Added a `docs.yaml` workflow that makes the github action bot reply to PRs with a link to built docs to your PRs. It only does so once, and then just updates the comment (although actually it doesn't necessarily need to, the link is always the same, but it's still nice in case someone changes the workflow). This is using the nightly toolchain, because we're using [`#[feature(doc_cfg)]`](https://doc.rust-lang.org/unstable-book/language-features/doc-cfg.html). ## Motivation I personally wanted this. Every now and then we get a PR with the description saying "the best way to review this is to start by looking at the generated docs". But then I need to checkout the PR, build the docs and open them. Having a link directly to the docs would be *amazing* IMO. I *also* think that having easy access to docs on every PR will make people check out the rendered docs on PRs more often. My hope here is that doc quality will thus improve. ## Breaking Changes <!-- Optional, if there are any breaking changes document them, including how to migrate older code. --> None of course. This is only CI. ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR. --> Wdyt? ## Change checklist - [x] Self-review. - ~~[ ] Documentation updates following the [style guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text), if relevant.~~ - ~~[ ] Tests if relevant.~~ - ~~[ ] All breaking changes documented.~~
Description
Added a
docs.yaml
workflow that makes the github action bot reply to PRs with a link to built docs to your PRs.It only does so once, and then just updates the comment (although actually it doesn't necessarily need to, the link is always the same, but it's still nice in case someone changes the workflow).
This is using the nightly toolchain, because we're using
#[feature(doc_cfg)]
.Motivation
I personally wanted this. Every now and then we get a PR with the description saying "the best way to review this is to start by looking at the generated docs". But then I need to checkout the PR, build the docs and open them. Having a link directly to the docs would be amazing IMO.
I also think that having easy access to docs on every PR will make people check out the rendered docs on PRs more often. My hope here is that doc quality will thus improve.
Breaking Changes
None of course. This is only CI.
Notes & open questions
Wdyt?
Change checklist
[ ] Documentation updates following the style guide, if relevant.[ ] Tests if relevant.[ ] All breaking changes documented.