You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
patterns/.github/workflows/install-mdbook/action.yml

49 lines
1.7 KiB
YAML

name: Install mdbook and dependencies
description: Install the mdbook with the dependencies we need.
runs:
using: composite
steps:
- name: Read mdbook version from .env
id: mdbook-version
run: |
. ./.env
echo "version=$MDBOOK_VERSION" >> $GITHUB_OUTPUT
shell: bash
- name: Read mdbook-i18n-helpers version from .env
id: mdbook-i18n-helpers-version
run: |
. ./.env
echo "version=$MDBOOK_I18N_HELPERS_VERSION" >> $GITHUB_OUTPUT
shell: bash
- name: Read mdbook-pandoc version from .env
id: mdbook-pandoc-version
run: |
. ./.env
echo "version=$MDBOOK_PANDOC_VERSION" >> $GITHUB_OUTPUT
shell: bash
- name: Read mdbook-last-changed version from .env
id: mdbook-last-changed-version
run: |
. ./.env
echo "version=$MDBOOK_LAST_CHANGED_VERSION" >> $GITHUB_OUTPUT
shell: bash
- name: Install dependencies
uses: taiki-e/install-action@v2
with:
tool: mdbook@${{ steps.mdbook-version.outputs.version }},mdbook-pandoc@${{ steps.mdbook-pandoc-version.outputs.version }},mdbook-i18n-helpers@${{ steps.mdbook-i18n-helpers-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