-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (34 loc) · 1.19 KB
/
compile-and-upload-pdf.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# This is a basic workflow to help you get started with Actions
name: Build Latex Document
# Controls when the workflow will run
on: [push]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build_latex:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v3
- name: Compile LaTeX document
uses: xu-cheng/latex-action@v3
with:
root_file: main.tex
extra_fonts: NotoSerifDevanagari.ttf
latexmk_use_xelatex: true
- name: Upload the thesis document
uses: actions/upload-artifact@v3
with:
name: PDF
path: main.pdf
- name: Check pdf file
run: |
file main.pdf | grep -q ' PDF '
- name: Upload file to repository
run: |
git config --global user.name "yamanksingla"
git config --global user.email "yamank@iiitd.ac.in"
git add main.pdf
git commit -m "Updated thesis [skip ci]"
git push
if: github.event_name == 'push' && github.ref == 'refs/heads/main'