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: http://gitlab.local.chriphost.de:3000/christoph/texlive-action@master
      #   with:
      #     texlive_version: latest
      #     scheme: full
      #     run: latexmk --shell-escape -pdf thesis.tex
      - name: Build LaTeX document
        # run: docker run --rm -v "$GITHUB_WORKSPACE:/document" ghcr.io/xu-cheng/texlive-full:latest /bin/bash -c -- latexmk -shell-escape -pdf /document/thesis.tex
        run: docker run --rm -v "$GITHUB_WORKSPACE:/document" ghcr.io/xu-cheng/texlive-full:latest "/bin/bash -c -- ls -R"
      - 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
