2024-09-30 12:15:17 +00:00
|
|
|
name: Build LaTeX Document
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master # This will run the action when you push to the main branch
|
|
|
|
pull_request:
|
|
|
|
|
2024-09-06 13:51:52 +00:00
|
|
|
jobs:
|
2024-09-30 12:15:17 +00:00
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
2024-09-06 13:51:52 +00:00
|
|
|
steps:
|
2024-09-30 12:15:17 +00:00
|
|
|
# Checkout the repository containing the LaTeX files
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
# Install LaTeX dependencies manually (TexLive and BibTeX)
|
|
|
|
- name: Install LaTeX
|
2024-09-27 11:15:48 +00:00
|
|
|
run: |
|
2024-09-30 12:15:17 +00:00
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y texlive-full biber
|
|
|
|
|
|
|
|
# Compile the LaTeX document (first pass)
|
|
|
|
- name: Compile LaTeX (first pass)
|
|
|
|
run: |
|
2024-09-30 12:27:37 +00:00
|
|
|
cd src
|
2024-09-30 12:15:17 +00:00
|
|
|
pdflatex -interaction=nonstopmode -halt-on-error -file-line-error main.tex
|
|
|
|
bibtex main
|
|
|
|
pdflatex -interaction=nonstopmode -halt-on-error -file-line-error main.tex
|
|
|
|
pdflatex -interaction=nonstopmode -halt-on-error -file-line-error main.tex
|
|
|
|
|
|
|
|
# Upload the compiled PDF as an artifact
|
|
|
|
- name: Upload PDF
|
|
|
|
uses: actions/upload-artifact@v3
|
2024-09-06 13:51:52 +00:00
|
|
|
with:
|
2024-09-30 12:15:17 +00:00
|
|
|
name: compiled-latex
|
2024-09-30 12:27:37 +00:00
|
|
|
path: src/main.pdf
|