zcash/halo2#713 added a second renderer to mdBook, and it turns out
that causes mdBook to generate subfolders that it doesn't do with a
single renderer. We now handle the presence of the subfolders when
publishing the book to GitHub Pages.
The `mdbook` binaries are currently built using `ubuntu-latest`, meaning
can end up relying on newer versions of GLIBC. Until this is fixed
upstream (https://github.com/rust-lang/mdBook/issues/1779), we will use
the same runner configuration as them.
`cargo rustdoc` only works for a single package. To render docs for
a workspace while passing config options to `rustdoc`, we need to use
the `RUSTDOCFLAGS` environment variable.
We also add several other flags to handle the switch to `cargo doc`:
- `--no-deps` ensures we only build packages in the workspace.
- `--enable-index-page` (unstable) adds a landing page showing the list
of rendered crate docs.