To latexmk your LaTeX document by GitHub Action just
create a .github/workflows/latexmk.yml file:
name: latexmk
'on':
push:
jobs:
latexmk:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
- uses: yegor256/latexmk-action@0.18.0
with:
cmd: latexmk
path: foo
document: paper.tex
opts: -pdf
packages: acmart tikzPreferably, you should have .latexmkrc in the foo directory of your repository,
which configures the behavior of latexmk.
If you don't have special requirements in your project, and just need to compile
a .tex file, skip the config, everything should work out of the box.
The options available (provided via the with YAML element):
cmdis the command to run (default islatexmk)pathis a relative path of the directory with.texfile(s)documentis a name of the.texfile to compile (no default)optsis the options to pass tolatexmkpackagesis a space-separated list of TeXLive package to install from CTANdependsis a file with TeXLive packages, as CTAN expects them
In order to test this action, just run:
make testThis should build a new Docker image and then try to use it
in order to render a simple test.tex document. You need to have
Docker installed.