Skip to content

Commit 6efefe0

Browse files
authored
Create main.yml
1 parent f15c76b commit 6efefe0

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/main.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: LaTeX Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Check out repository
15+
uses: actions/checkout@v2
16+
17+
- name: Install LaTeX and Biber
18+
run: |
19+
sudo apt-get update
20+
sudo apt-get install -y texlive-full biber
21+
22+
- name: Ensure .bib file exists
23+
run: |
24+
if [ ! -f DISSERTATION/my.bib ]; then
25+
echo "Error: DISSERTATION/my.bib file not found!"
26+
exit 1
27+
fi
28+
29+
- name: Compile LaTeX document with Biber
30+
env:
31+
BIBINPUTS: "./DISSERTATION:" # Path to find .bib files
32+
TEXINPUTS: "./DISSERTATION:" # Path to find .tex files
33+
run: |
34+
cd DISSERTATION
35+
latexmk -pdf -bibtex -shell-escape -synctex=1 -interaction=nonstopmode -f main.tex

0 commit comments

Comments
 (0)