From 19bb2b00ae8982ea30573504193942f00e2bf437 Mon Sep 17 00:00:00 2001 From: Magrathean UK <88115882+magrathean-uk@users.noreply.github.com> Date: Sun, 27 Sep 2026 08:33:56 +0100 Subject: [PATCH] Publish the generated user guide PDF --- .github/workflows/install-mdbook/action.yml | 16 ++++++------ .github/workflows/mdbook.yml | 4 +-- book.toml | 28 ++++++++++----------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/workflows/install-mdbook/action.yml b/.github/workflows/install-mdbook/action.yml index c933ebd..259c3aa 100644 --- a/.github/workflows/install-mdbook/action.yml +++ b/.github/workflows/install-mdbook/action.yml @@ -31,11 +31,11 @@ runs: with: tool: mdbook@${{ steps.mdbook-version.outputs.version }},mdbook-pandoc@${{ steps.mdbook-pandoc-version.outputs.version }},mdbook-last-changed@${{ steps.mdbook-last-changed-version.outputs.version }} - # - name: Install mdbook-pandoc and related dependencies - # run: | - # . ./.env - # sudo apt-get update - # sudo apt-get install -y texlive texlive-latex-extra texlive-luatex texlive-lang-cjk librsvg2-bin fonts-noto - # curl -LsSf https://github.com/jgm/pandoc/releases/download/$PANDOC_VERSION/pandoc-$PANDOC_VERSION-linux-amd64.tar.gz | tar zxf - - # echo "$PWD/pandoc-$PANDOC_VERSION/bin" >> $GITHUB_PATH - # shell: bash + - name: Install mdbook-pandoc and related dependencies + run: | + . ./.env + sudo apt-get update + sudo apt-get install -y texlive texlive-latex-extra texlive-luatex texlive-lang-cjk librsvg2-bin fonts-noto + curl -LsSf https://github.com/jgm/pandoc/releases/download/$PANDOC_VERSION/pandoc-$PANDOC_VERSION-linux-amd64.tar.gz | tar zxf - + echo "$PWD/pandoc-$PANDOC_VERSION/bin" >> $GITHUB_PATH + shell: bash diff --git a/.github/workflows/mdbook.yml b/.github/workflows/mdbook.yml index ead5f5c..1f7f9ae 100644 --- a/.github/workflows/mdbook.yml +++ b/.github/workflows/mdbook.yml @@ -37,8 +37,8 @@ jobs: - name: Build course run: | mdbook build -d book - # mv book/html/* book/pandoc/pdf/*.pdf book/ - # rm -r book/html book/pandoc + mv book/html/* book/pandoc/pdf/rustic-user-docs.pdf book/ + rm -r book/html book/pandoc - name: Upload artifact uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3 diff --git a/book.toml b/book.toml index 4b8bcd3..6cbf930 100644 --- a/book.toml +++ b/book.toml @@ -24,19 +24,19 @@ additional-css = ["./styles/last-changed.css"] enable = true level = 0 -# [output.pandoc] -# optional = true -# hosted-html = "https://rustic.cli.rs/docs/" +[output.pandoc] +optional = true +hosted-html = "https://rustic.cli.rs/docs/" -# [output.pandoc.profile.pdf] -# output-file = "rustic-user-docs.pdf" -# pdf-engine = "lualatex" +[output.pandoc.profile.pdf] +output-file = "rustic-user-docs.pdf" +pdf-engine = "lualatex" -# [output.pandoc.profile.pdf.variables] -# mainfont = "Noto Serif" -# sansfont = "Noto Sans" -# monofont = "Noto Sans Mono" -# mainfontfallback = ["NotoSerifCJKSC:"] -# geometry = ["margin=1in"] -# linkcolor = "blue" -# urlcolor = "red" +[output.pandoc.profile.pdf.variables] +mainfont = "Noto Serif" +sansfont = "Noto Sans" +monofont = "Noto Sans Mono" +mainfontfallback = ["NotoSerifCJKSC:"] +geometry = ["margin=1in"] +linkcolor = "blue" +urlcolor = "red"