Skip to content

Commit a5a02d6

Browse files
committed
Update documentation workflow to build and redirect crate docs
- Renamed workflow from "Docs" to "Build Docs" for clarity. - Added RUSTDOCFLAGS environment variable to configure documentation generation. - Included a step to create a root index that redirects to the crate documentation.
1 parent 0ad5e7b commit a5a02d6

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/doc-rust.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Docs
1+
name: Build Docs
22

33
on:
44
push:
@@ -22,7 +22,12 @@ jobs:
2222
- uses: actions/configure-pages@v5
2323
- uses: dtolnay/rust-toolchain@stable
2424
- name: Build docs
25-
run: cargo doc --all-features --no-deps
25+
env:
26+
RUSTDOCFLAGS: --cfg docsrs
27+
run: |
28+
cargo doc --all-features --no-deps
29+
# Add a root index that redirects to the crate docs
30+
echo '<!doctype html><meta http-equiv="refresh" content="0; url=usrgrp_manager/index.html">' > target/doc/index.html
2631
- uses: actions/upload-pages-artifact@v3
2732
with:
2833
path: target/doc

0 commit comments

Comments
 (0)