deploy docs on github pages#40
Conversation
|
Hey thanks for the PR! That seems like a feasible approach, but we don't need the "use_neovim_lib" feature, that's for testing/benchmarking only. Is there a way to check that we're documenting all features this way? E.g. we might add "use_glib" in the future, could this workflow error out in that case, so we don't forget to add the docs? |
This is easy to remove it from .github/workflows/doc.sh.
First, these is a way to warn/forbid all the missing docs on all public items and mods: #![warn(missing_docs)]
#![deny(missing_docs)]You can see rustdoc/lints. Second, as for the feature or any cfg banners, you can use the unstable #![doc_auto_cfg] to auto add the banners (due to rust-lang/rust#89596 and rust-lang/rust#90502). Note this needs nightly Rust to get the documentation as expected. Here is a mini example: # Cargo.toml
[features]
a = []
b = []//! doc for crate
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![warn(missing_docs)]
/// doc for feature a and unix
#[cfg(feature = "a")]
#[cfg(unix)]
pub mod a {}
/// doc for feature b
#[cfg(feature = "b")]
pub mod b {}Run For nvim-rs, steps are:
#[cfg(feature = "use_tokio")] instead of #[cfg(feature = "use_tokio")]
#[cfg_attr(docsrs, doc(cfg(feature = "use_tokio")))]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]instead of #![cfg_attr(docsrs, feature(doc_cfg))] |
|
You can check the updated PR and sample documentation above. |
|
So, ok, I have those settings you showed above (many many thanks for the screenshot, I'd not have managed otherwise :D). Should work, shouldn't it? |
|
Oops two CI errors. |
|
I did those deploy_key things and retriggered the jobs. Not sure what this windows failure is about, though... |
|
The doc job still errors with the same error. I guess you'd need to do this: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-set-ssh-private-key-deploy_key? |
|
Yes, now I've replaced with GITHUB_TOKEN with the deploy_key. |
|
Seems I need to set that deploy_key too? |
|
Now I've set that |
|
I see what this means now:
You need a secret called Follow here :) |
|
Sorry I could not find time for the last few days :) I've now redone the whole thing. The linked docs are outdated, but now I added (e) Naaa didn't work. I've added |
|
No idea what to do now :( You can see what I did here, can you make heads or tails of this? |
|
Could you rerun the workflow again now? Because I added |
|
Just the same :( |
|
Well, failed again :( |
|
This time Doc CI is ignored due to the new commit :)
So you can have this PR merged and then create a new commit on master branch to check whether the doc deployment is successful. |
Alright, let's just try that! |
deploy docs on github pages c66b7fa
|
Alright, nice, thanks for your patience. Now I just need some sort of bannerpage on killthemule.github.io and proper links from the docs/README. And non-broken CI :D |

This PR is very simple and may help to show docs under distinct and incompatible features, which is related to #36.
Note:

This will create a
gh-pagesbranch, and you have to set the source:The generated files look like these.
Licensing: The code contributed to nvim-rs is licensed under the MIT or
Apache license as given in the project root directory.