Skip to content

Commit b8d02d1

Browse files
committed
ci: add documentation generation job
1. add doc ci in workflow 2. remove the readme in rmcp crate Signed-off-by: jokemanfire <[email protected]>
1 parent cc3f299 commit b8d02d1

File tree

3 files changed

+27
-184
lines changed

3 files changed

+27
-184
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,32 @@ jobs:
9090
- name: Run tests
9191
run: cargo test --all-features
9292

93+
doc:
94+
name: Generate Documentation
95+
runs-on: ubuntu-latest
96+
steps:
97+
- uses: actions/checkout@v3
98+
99+
- name: Install Rust
100+
uses: dtolnay/rust-toolchain@stable
101+
102+
- name: Cache dependencies
103+
uses: actions/cache@v3
104+
with:
105+
path: |
106+
~/.cargo/registry
107+
~/.cargo/git
108+
target
109+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
110+
restore-keys: ${{ runner.os }}-cargo-
111+
112+
- name: Generate documentation
113+
run: |
114+
cargo doc --no-deps -p rmcp -p rmcp-macros
115+
# there must be no warnings , doc hasn't been fix yet, so skip it
116+
# env:
117+
# RUSTDOCFLAGS: -Dwarnings
118+
93119
release:
94120
name: Release crates
95121
runs-on: ubuntu-latest

crates/rmcp/README.md

Lines changed: 0 additions & 183 deletions
This file was deleted.

crates/rmcp/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/README.md"))]
1+
#![doc = include_str!("../../../README.md")]
22
mod error;
33
pub use error::Error;
44

0 commit comments

Comments
 (0)