Skip to content

Commit

Permalink
Build dev docs like docs.rs (#12223)
Browse files Browse the repository at this point in the history
# 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
  • Loading branch information
mockersf committed Mar 1, 2024
1 parent 94ff123 commit 6b212a8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/docs.yml
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -47,7 +49,7 @@ jobs:
echo "<meta name=\"robots\" content=\"noindex\">" > 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
Expand Down

0 comments on commit 6b212a8

Please sign in to comment.