Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayushi141 authored Oct 11, 2024
1 parent 08e1b97 commit d66525e
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
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

0 comments on commit d66525e

Please sign in to comment.