name: Build LaTeX document
on: [push]
jobs:
  build_latex:
    runs-on: ubuntu-latest
    steps:
      - name: Set up Git repository
        uses: actions/checkout@v4
      - name: Compile LaTeX document
        uses: https://github.com/xu-cheng/latex-action@v3
        with:
          root_file: Main.tex
          latexmk_shell_escape: true
          latexmk_use_xelatex: true
          working_directory: thesis
      - name: Upload PDF file
        uses: actions/upload-artifact@v4
        with:
          name: latest-thesis
          path: thesis/Main.pdf
