Skip to content

Commit a5793f3

Browse files
committed
build mdbook as part of the PR CI
Signed-off-by: Andrei Gherghescu <[email protected]>
1 parent 994d783 commit a5793f3

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,3 +123,15 @@ jobs:
123123
with:
124124
targets: wasm32-unknown-unknown
125125
- run: cd ${{ github.workspace }}/examples/wasm-yew/${{ matrix.example }} && cargo build --target wasm32-unknown-unknown
126+
127+
build_book:
128+
name: Build Book
129+
runs-on: ubuntu-latest
130+
steps:
131+
- uses: actions/checkout@v4
132+
- uses: dtolnay/rust-toolchain@stable
133+
- name: Build examples html files
134+
run: |
135+
or dir in ls examples/; do (cd $dir && cargo run) ; done
136+
- name: Build book
137+
run: mdbook build docs/book

examples/customization/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ fn show_with_default_app(temp_path: &str) {
133133
fn write_example_to_html(plot: &Plot, name: &str) -> String {
134134
std::fs::create_dir_all("./output").unwrap();
135135
// Write inline HTML
136-
let html = plot.to_inline_html(Some(&name));
136+
let html = plot.to_inline_html(Some(name));
137137
let path = format!("./output/inline_{}.html", name);
138138
std::fs::write(path, html).unwrap();
139139
// Write standalone HTML

0 commit comments

Comments
 (0)