From 6b212a8bd4bf4a17d78e22ff123836d797d3e79a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois?= Date: Fri, 1 Mar 2024 17:01:25 +0100 Subject: [PATCH] Build dev docs like docs.rs (#12223) # Objective - docs are not built the same on the http://dev-docs.bevyengine.org than on http://docs.rs/bevy/ ## Solution - Use nightly like docs.rs - Scrape examples --- .github/workflows/docs.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 63de216762b46..ee3c6d848c5af 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -10,6 +10,7 @@ on: env: CARGO_TERM_COLOR: always RUSTDOCFLAGS: --html-in-header header.html + NIGHTLY_TOOLCHAIN: nightly # Sets the permissions to allow deploying to Github pages. permissions: @@ -32,8 +33,9 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Install Rust - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ env.NIGHTLY_TOOLCHAIN }} - name: Install alsa and udev run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev @@ -47,7 +49,7 @@ jobs: echo "" > header.html - name: Build docs - run: cargo doc --all-features --no-deps -p bevy + run: cargo doc --all-features --no-deps -p bevy -Zunstable-options -Zrustdoc-scrape-examples # This adds the following: # - A top level redirect to the bevy crate documentation