Skip to content

Commit

Permalink
Upgrade mdbook-pandoc and disable it except during CI workflows (#2212
Browse files Browse the repository at this point in the history
)

Implements the approach summarized in
google/mdbook-i18n-helpers#200 (comment)
to disable running `mdbook-pandoc` even if it is available to avoid
dependency-related issues during local rendering.

Should address #1911
since `mdbook-pandoc` will no longer run locally.
  • Loading branch information
max-heller authored Jul 18, 2024
1 parent 0541699 commit df2076b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ else
fi
fi

# Enable mdbook-pandoc to build PDF version of the course
export MDBOOK_OUTPUT__PANDOC__DISABLED=false

mdbook build -d "$dest_dir"

# Disable the redbox button in built versions of the course
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/install-mdbook/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ runs:

- name: Install mdbook-pandoc and related dependencies
run: |
cargo install mdbook-pandoc --locked --version 0.6.4
cargo install mdbook-pandoc --locked --version 0.7.0
sudo apt-get update
sudo apt-get install -y texlive texlive-luatex texlive-lang-cjk librsvg2-bin fonts-noto
curl -LsSf https://github.com/jgm/pandoc/releases/download/3.2/pandoc-3.2-linux-amd64.tar.gz | tar zxf -
echo "$PWD/pandoc-3.2/bin" >> $GITHUB_PATH
curl -LsSf https://github.com/jgm/pandoc/releases/download/3.2.1/pandoc-3.2.1-linux-amd64.tar.gz | tar zxf -
echo "$PWD/pandoc-3.2.1/bin" >> $GITHUB_PATH
shell: bash

- name: Install mdbook-i18n-helpers
Expand Down
1 change: 1 addition & 0 deletions book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ verbose = false # Report timing information.

[output.pandoc]
optional = true
disabled = true
hosted-html = "https://google.github.io/comprehensive-rust/"

[output.pandoc.profile.pdf]
Expand Down

0 comments on commit df2076b

Please sign in to comment.