Skip to content

Commit fbb3e95

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

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,3 +123,21 @@ 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 to generate needed html files
134+
run: |
135+
cd ${{ github.workspace }}/examples/basic_charts && cargo run
136+
cd ${{ github.workspace }}/examples/statistical_charts && cargo run
137+
cd ${{ github.workspace }}/examples/scientific_charts && cargo run
138+
cd ${{ github.workspace }}/examples/financial_charts && cargo run
139+
cd ${{ github.workspace }}/examples/3d_charts && cargo run
140+
cd ${{ github.workspace }}/examples/subplots && cargo run
141+
cd ${{ github.workspace }}/examples/shapes && cargo run
142+
- name: Build book
143+
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)