diff --git a/.github/workflows/publish-rust.yml b/.github/workflows/publish-rust.yml index bd94862ff..b594f9d72 100644 --- a/.github/workflows/publish-rust.yml +++ b/.github/workflows/publish-rust.yml @@ -102,6 +102,24 @@ jobs: - name: Run clippy run: ./scripts/check-clippy.sh + docsrs: + name: Docs.rs + needs: [sanity] + runs-on: ubuntu-latest + steps: + - name: Git Checkout + uses: actions/checkout@v4 + + - name: Install 'nightly' toolchain + uses: dtolnay/rust-toolchain@nightly + + - name: Run docs.rs build + run: | + # Mimic docs.rs build environment + export DOCS_RS="1" + export RUSTDOCFLAGS="--cfg docsrs" + cargo +nightly doc --no-deps --all-features --manifest-path "${{ inputs.package_path }}/Cargo.toml" + detached-minimal-versions: name: Check minimal-versions on detached crate runs-on: ubuntu-latest @@ -188,7 +206,7 @@ jobs: publish-crate: name: Publish crate runs-on: ubuntu-latest - needs: [format, clippy, detached-minimal-versions, semver] + needs: [format, clippy, detached-minimal-versions, semver, docsrs] permissions: contents: write steps: