Skip to content

Create main.yml

Create main.yml #1

Workflow file for this run

name: Github Actions CI to build pdf from tex source.
on: push
jobs:
build:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Set up Git repository
uses: actions/checkout@v2
- name: Compile LaTeX document
uses: xu-cheng/latex-action@v3
with:
root_file: main.tex
args: -pdf -file-line-error -halt-on-error -interaction=nonstopmode
pre_compile: tlmgr update --self && tlmgr update --all
post_compile: latexmk -c && mv main.pdf lecture_notes.pdf
- name: Check pdf file
run: |
file lecture_notes.pdf | grep -q ' PDF '
- name: Upload file to repository
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update lecture notes PDF
file_pattern: lecture_notes.pdf