1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2024-11-24 17:06:37 +02:00

Move pandoc/ folder out of the way (#1704)

The config fragments there are only used in the GitHub actions, so we
can stash them way in the `.github/` folder.
This commit is contained in:
Martin Geisler 2024-01-17 01:25:45 +01:00 committed by GitHub
parent 312e1515ec
commit d731da4a5e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 10 additions and 2 deletions

4
.github/pandoc/README.md vendored Normal file
View File

@ -0,0 +1,4 @@
# Config Overrides for `mdbook-pandoc`
The configuration file fragments here are used to override the configuration in
`book.toml`. See `.github/workflows/build.sh` for details.

View File

@ -31,11 +31,15 @@ else
export MDBOOK_OUTPUT__HTML__REDIRECT='{}'
# Include language-specific Pandoc configuration
[ -f "pandoc/$book_lang.yaml" ] && export MDBOOK_OUTPUT__PANDOC__PROFILE__PDF__DEFAULTS="pandoc/$book_lang.yaml"
if [ -f ".github/pandoc/$book_lang.yaml" ]; then
export MDBOOK_OUTPUT__PANDOC__PROFILE__PDF__DEFAULTS=".github/pandoc/$book_lang.yaml"
fi
fi
mdbook build -d "$dest_dir"
[ -f "$dest_dir/pandoc/pdf/comprehensive-rust.pdf" ] && mv "$dest_dir/pandoc/pdf/comprehensive-rust.pdf" "$dest_dir/html/"
if [ -f "$dest_dir/pandoc/pdf/comprehensive-rust.pdf" ]; then
mv "$dest_dir/pandoc/pdf/comprehensive-rust.pdf" "$dest_dir/html/"
fi
(cd "$dest_dir/exerciser" && zip --recurse-paths ../html/comprehensive-rust-exercises.zip comprehensive-rust-exercises/)
echo "::endgroup::"