Skip to content

mu373/texlive-action

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Test TeXLive Action

TeXLive Action

This action compiles LaTeX docs to PDF using latexmk with a minimal texlive image.

Differences from the original repoository (repaction/texlive)

  • Includes Microsoft fonts (i.e., Times New Roman)
  • Uses TeX Live Docker image from Paperist/texlive-ja

Example

In your TeX document repository, setup a GitHub Action like this. The compiled PDF will be available as artifacts (downloadable as ZIP).

name: Build LaTeX document
on:
  workflow_dispatch:

jobs:
  build_latex:
    runs-on: ubuntu-latest
    steps:
      - name: Set up Git repository
        uses: actions/checkout@v3
      - name: Login to GitHub Container Registry
        uses: docker/login-action@v3
        with:
          registry: ghcr.io
          username: ${{ github.repository_owner }}
          password: ${{ secrets.container_registory_pat }} # You need to have your Personal Access Token set to environment secrets `$container_registory_pat` 
      - name: Pull LaTeX Docker image
        run: docker pull ghcr.io/mu373/texlive-action:latest
      - name: Compile LaTeX document
        run: |
          docker run --rm \
            -v ${{ github.workspace }}:/files \
            -w /files/ \
            ghcr.io/mu373/texlive-action:latest \
            main.tex \
            latexmk \
            ''
      - name: Archive production artifacts
        uses: actions/upload-artifact@v3
        with:
          name: pdf
          path: main.pdf
          retention-days: 5

References:

[1] https://github.com/xu-cheng/latex-action

Releases

No releases published

Packages

No packages published

Languages

  • Shell 46.0%
  • Dockerfile 27.8%
  • TeX 26.2%