You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
latex2pdf
1.0.3
GitHub action to convert LaTeX document in PDF file
output_dir
: use it to get the PDF file at a specific location at the end of the compilation.main_latex_file
: main latex file to convert (ex:main.tex
).ctan_packages
: Extra package from CTAN to install. List of packages available here. Each package must be separated by a space (ex: "moderncv xargs")."
You can refer to the example attached in this repository.
In the example below we compile the document in PDF and upload as an artefact of the pipeline:
name: LateX to PDF
on:
push:
branches:
- master
- develop
tags:
- '*'
pull_request:
branches: [ master ]
jobs:
build_latex:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v2
- name: latex2pdf
id: compile-latex-document
uses: thomas-chauvet/[email protected]
with:
output_dir: output
main_latex_file: test.tex
ctan_packages: amssymb latexsym amsmath
- name: Upload PDF to the workflow tab
id: upload-workflow-tab
uses: actions/upload-artifact@v2
with:
name: output
path: output/test.pdf
You can find a more complete example in my CV repository with everything to release the PDF document.
The Docker
images used to compile the document is based on Ubuntu
and the excellent work of @Yihui for TinyTeX. It allows the image to stay relatively small and use only what is needed.