Skip to content

Commit

Permalink
disable redbook in build.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
djmitche committed Mar 4, 2024
1 parent 37e74ca commit 2681f47
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ else
fi

mdbook build -d "$dest_dir"
sed -i '/<!-- MARKER_START -->./../../theme/redbox.js<!-- MARKER_END -->/d' ./../../theme/redbox.js
if [ -f "$dest_dir/pandoc/pdf/comprehensive-rust.pdf" ]; then
mv "$dest_dir/pandoc/pdf/comprehensive-rust.pdf" "$dest_dir/html/"
fi

# Disable the redbox button in built versions of the course
echo '// disabled' > "${dest_dir}/html/theme/redbox.js"

mv "$dest_dir/pandoc/pdf/comprehensive-rust.pdf" "$dest_dir/html/"
(cd "$dest_dir/exerciser" && zip --recurse-paths ../html/comprehensive-rust-exercises.zip comprehensive-rust-exercises/)

echo "::endgroup::"

0 comments on commit 2681f47

Please sign in to comment.