Skip to content

Commit 2432b93

Browse files
committed
ci: add documentation generation job
1. add doc ci in workflow(now not check) 2. remove the readme in rmcp crate Signed-off-by: jokemanfire <[email protected]>
1 parent 0a2f13a commit 2432b93

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
@@ -106,6 +106,32 @@ jobs:
106106
- name: Run tests
107107
run: cargo test --all-features
108108

109+
doc:
110+
name: Generate Documentation
111+
runs-on: ubuntu-latest
112+
steps:
113+
- uses: actions/checkout@v3
114+
115+
- name: Install Rust
116+
uses: dtolnay/rust-toolchain@stable
117+
118+
- name: Cache dependencies
119+
uses: actions/cache@v3
120+
with:
121+
path: |
122+
~/.cargo/registry
123+
~/.cargo/git
124+
target
125+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
126+
restore-keys: ${{ runner.os }}-cargo-
127+
128+
- name: Generate documentation
129+
run: |
130+
cargo doc --no-deps -p rmcp -p rmcp-macros
131+
# there must be no warnings , doc hasn't been fix yet, so skip it
132+
# env:
133+
# RUSTDOCFLAGS: -Dwarnings
134+
109135
release:
110136
name: Release crates
111137
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)