Skip to content

Commit 38b3ac1

Browse files
committed
build: add mdbook and mdbook-alerts to devshell, build the book in the CI docs workflow
* for now add them to the devshell: something not working correctly with the shell.nix for me, also a bit easier to just share the same env; (however it's valuable to have a more fine-grained shell for the docs only) * TODO: add deploy for the docs
1 parent 3c8a333 commit 38b3ac1

File tree

4 files changed

+32
-9
lines changed

4 files changed

+32
-9
lines changed

ci/deploy/docs.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,18 @@
22

33
set -e
44

5-
pushd docs/experimental-documentation
5+
pushd docs/experimental-documentation/mdbook-ct
6+
7+
# TODO: eventually: a more fine-grained nix shell/env?
8+
# nix-shell --command "mdbook build"
9+
10+
# for now depending on global project devshell
11+
mdbook build # build output is in the `book` directory
12+
13+
# TODO: deploy book to codetracer.com ? ask Zahary?
614

715
echo '###############################################################################'
8-
echo TODO
16+
echo "TODO upload book"
917
echo '###############################################################################'
1018

1119
popd
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
let
2+
pkgs = import <nixpkgs> {};
3+
in
4+
pkgs.mkShell {
5+
buildInputs = with pkgs; [
6+
bash
7+
mdbook
8+
mdbook-alerts
9+
];
10+
nativeBuildInputs = with pkgs; [
11+
bash
12+
mdbook
13+
mdbook-alerts
14+
];
15+
}

docs/experimental-documentation/shell.nix

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,11 @@ let
33
in
44
pkgs.mkShell {
55
buildInputs = with pkgs; [
6-
bash
7-
terser
8-
pandoc
9-
parallel
6+
bash
107
];
118
nativeBuildInputs = with pkgs; [
129
bash
13-
terser
14-
pandoc
15-
parallel
10+
mdbook
11+
mdbook-alerts
1612
];
1713
}

nix/shells/main.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ in
9696
# a tool to help with binary files
9797
hexdump
9898

99+
# docs
100+
mdbook
101+
mdbook-alerts
102+
99103
# cachix support
100104
cachix
101105

0 commit comments

Comments
 (0)