name: build pdf
on: [push,watch]

jobs:
  build:
    runs-on: macos  # use label

    steps:
      - name: Check out the repository
        uses: actions/checkout@v4

      - name: Compile LaTeX using local TeX Live
        # These commands run directly in your machine's shell
        run: |
          echo "Compiling document..."
          latexmk -pdf poster.tex
          latexmk -pdf slides.tex
      
      - name: List files in the workspace
        run: ls -l

      - uses: akkuman/gitea-release-action@v1
        with:
          body: ''
          prerelease: true
          name: PDF
          token: ${{ secrets.RELEASE_TOKEN }}
          tag_name: latest
          files: |-
            ./*.pdf
