From 2991abe34a5182d143d64b4ec7fddb796923ca14 Mon Sep 17 00:00:00 2001 From: sneakers-the-rat Date: Mon, 5 Jun 2023 18:56:16 -0700 Subject: [PATCH] trying with build script --- .github/workflows/deploy.yml | 2 +- Cargo.toml | 2 +- src/build.rs | 15 +++++++++++++++ src/sketchpad.md | 2 ++ 4 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 src/build.rs diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7b1a588..ee2462f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -42,7 +42,7 @@ jobs: run: | # This assumes your book is in the root of your repository. # Just add a `cd` here if you need to change to another directory. - mdbook build + # mdbook build git worktree add gh-pages git config user.name "Deploy from CI" git config user.email "" diff --git a/Cargo.toml b/Cargo.toml index 817d5b2..b69681c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies] +[build-dependencies] mdbook = "0.4.30" mdbook-bib = "0.0.5" mdbook-mermaid = "0.12.6" diff --git a/src/build.rs b/src/build.rs new file mode 100644 index 0000000..8c65f38 --- /dev/null +++ b/src/build.rs @@ -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", + ]); + +} \ No newline at end of file diff --git a/src/sketchpad.md b/src/sketchpad.md index f01f217..536fe82 100644 --- a/src/sketchpad.md +++ b/src/sketchpad.md @@ -1,5 +1,7 @@ # Sketchpad +Dummy change to check that we don't invalidate the rust cache on CI. + ## System Diagram Just a stub to check if mermaid works