name: Install mdbook and dependencies

description: Install mdbook with the dependencies we need.

runs:
  using: composite
  steps:
    - name: Install mdbook
      run: cargo xtask install-tools
      shell: bash

    - name: Install dependencies for mdbook-pandoc
      run: |
        sudo apt-get update
        sudo apt-get install -y texlive texlive-luatex texlive-lang-cjk texlive-lang-arabic librsvg2-bin fonts-noto
        curl -LsSf https://github.com/jgm/pandoc/releases/download/3.7.0.1/pandoc-3.7.0.1-linux-amd64.tar.gz | tar zxf -
        echo "$PWD/pandoc-3.7.0.1/bin" >> $GITHUB_PATH
      shell: bash
