name: Build LaTeX document

on:
  push:
    branches: [master]

jobs:
  build-latex:
    runs-on: ubuntu-22.04
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
      - name: Build LaTeX document
        uses: https://github.com/xu-cheng/texlive-action@v1
        with:
          texlive_version: latest
          scheme: full
          run: latexmk --shell-escape -pdf thesis.tex
      - name: Rename document
        run: mv thesis.pdf facial-animation-using-inverse-kinematics.pdf
      - name: Upload artifact
        uses: actions/upload-artifact@v3
        with:
          name: PDF
          path: facial-animation-using-inverse-kinematics.pdf
