Skip to content
book

GitHub Action

Github Action with TeXLive

v2 Latest version

Github Action with TeXLive

book

Github Action with TeXLive

Run arbitrary commands in a TeXLive environment

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Github Action with TeXLive

uses: xu-cheng/texlive-action@v2

Learn more about this action in xu-cheng/texlive-action

Choose a version

texlive-action

GitHub Actions Status

GitHub Action to run arbitrary commands in a TeXLive environment.

It comes with two flavors, full and small. The full action has all TeXLive packages installed. The small one however only has basic packages installed to reduce its size. You can use tlmgr install <package> to install the missing packages. The base image is alpine. Use apk add <package> to install additional system packages. See latex-docker for the scripts to build the respective docker images.

This action is suitable to run arbitrary commands in a LaTeX environment. If you simply want to compile LaTeX documents, latex-action is better recommended.

Inputs

  • run: Arbitrary bash codes to be executed. It will be executed in the form of bash -eo pipefail -c {input}.
  • scheme: The scheme of TeXLive to be used, either full or small. By default, full TeXLive is used. This input cannot co-exist with docker_image input.
  • texlive_version: The version of TeXLive to be used. Supported inputs include 2020, 2021, 2022, 2023, 2024, and latest. By default the latest TeXLive is used. This input cannot co-exist with docker_image input.
  • docker_image: Custom which docker image to be used. Only latex-docker images are supported.

Example

  • Run commands in a full TeXLive environment.

    on: [push]
    jobs:
      build_latex:
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v4
          - uses: xu-cheng/texlive-action@v2
            with:
              scheme: full
              run: |
                apk add make
                make
  • Run commands in a small TeXLive environment.

    on: [push]
    jobs:
      build_latex:
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v4
          - uses: xu-cheng/texlive-action@v2
            with:
              scheme: small
              run: |
                apk add make
                make
  • Run commands in a 2022 TeXLive environment.

    on: [push]
    jobs:
      build_latex:
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v4
          - uses: xu-cheng/texlive-action@v2
            with:
              texlive_version: 2022
              run: |
                apk add make
                make
  • Run commands using custom docker image.

    on: [push]
    jobs:
      build_latex:
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v4
          - uses: xu-cheng/texlive-action@v2
            with:
              docker_image: ghcr.io/xu-cheng/texlive-full:20230801
              run: |
                apk add make
                make

License

MIT