trying with build script

This commit is contained in:
sneakers-the-rat 2023-06-05 18:56:16 -07:00
parent 7669f440dc
commit 2991abe34a
4 changed files with 19 additions and 2 deletions

View file

@ -42,7 +42,7 @@ jobs:
run: | run: |
# This assumes your book is in the root of your repository. # This assumes your book is in the root of your repository.
# Just add a `cd` here if you need to change to another directory. # Just add a `cd` here if you need to change to another directory.
mdbook build # mdbook build
git worktree add gh-pages git worktree add gh-pages
git config user.name "Deploy from CI" git config user.name "Deploy from CI"
git config user.email "" git config user.email ""

View file

@ -12,7 +12,7 @@ publish = false
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [build-dependencies]
mdbook = "0.4.30" mdbook = "0.4.30"
mdbook-bib = "0.0.5" mdbook-bib = "0.0.5"
mdbook-mermaid = "0.12.6" mdbook-mermaid = "0.12.6"

15
src/build.rs Normal file
View file

@ -0,0 +1,15 @@
// build.rs
// following https://github.com/tchernobog/rfcs/blob/master/text/0000-cargo-run-deps.md
use std::{env, process::Command};
fn main() {
let cargo_path = env::var("CARGO").unwrap();
let mut mdbook = Command::new(cargo_path).args(&[
"run",
"--package",
"mdbook",
"--",
"build",
]);
}

View file

@ -1,5 +1,7 @@
# Sketchpad # Sketchpad
Dummy change to check that we don't invalidate the rust cache on CI.
## System Diagram ## System Diagram
Just a stub to check if mermaid works Just a stub to check if mermaid works