Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayushi141 authored Oct 11, 2024
1 parent 3d79fcd commit 5796f5c
Showing 1 changed file with 4 additions and 38 deletions.
42 changes: 4 additions & 38 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,51 +11,17 @@ jobs:
- name: Compile LaTeX document
uses: xu-cheng/latex-action@v3
with:
# The root LaTeX file to be compiled
root_file: main.tex

# Interpret the root_file input as bash glob pattern
# glob_root_file: # optional

# The working directory for this action
# working_directory: # optional

# The LaTeX engine to be invoked
# compiler: # optional, default is latexmk

# Extra arguments to be passed to the LaTeX engine
args: -pdf -file-line-error -halt-on-error -interaction=nonstopmode

# Install extra packages by apk
# extra_system_packages: # optional

# Install extra .ttf/.otf fonts.
# extra_fonts: ./fonts/*.ttf

# Arbitrary bash codes to be executed before compiling LaTeX documents
pre_compile: tlmgr update --self && tlmgr update --all

# Arbitrary bash codes to be executed after compiling LaTeX documents
post_compile: latexmk -c && mv main.pdf lecture_notes.pdf

# Instruct latexmk to enable --shell-escape
# latexmk_shell_escape: # optional

# Instruct latexmk to use LuaLaTeX
# latexmk_use_lualatex: # optional

# Instruct latexmk to use XeLaTeX
# latexmk_use_xelatex: true

- name: Check pdf file
run: |
file lecture_notes.pdf | grep -q ' PDF '
- name: Upload file to repository
run: |
git config --global user.name "Ayushi141"
git config --global user.email "[email protected]"
git add lecture_notes.pdf
git commit -m "Update lecture notes PDF"
git push
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update lecture notes PDF
file_pattern: lecture_notes.pdf

0 comments on commit 5796f5c

Please sign in to comment.