Build docs of main branch with docsrs feature

This commit is contained in:
messense 2021-05-05 11:26:03 +08:00
parent dd26566d0c
commit 620c2730f5
2 changed files with 7 additions and 1 deletions

View File

@ -183,6 +183,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true
- name: "Build docs with docsrs flag"
run: cargo doc --no-deps --no-default-features --features "macros num-bigint num-complex hashbrown serde multiple-pymethods"

View File

@ -18,6 +18,11 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
@ -38,7 +43,7 @@ jobs:
# This adds the docs to gh-pages-build/doc
- name: Build the doc
run: |
cargo doc --features="default num-bigint num-complex" --no-deps
cargo +nightly rustdoc --lib --features="macros num-bigint num-complex hashbrown serde multiple-pymethods" -- --cfg docsrs
cp -r target/doc gh-pages-build/doc
echo "<meta http-equiv=refresh content=0;url=pyo3/index.html>" > gh-pages-build/doc/index.html