mirror of
https://github.com/soconnor0919/honors-thesis.git
synced 2026-02-04 21:46:31 -05:00
Add GitHub Action to build proposal and thesis
This commit is contained in:
49
.github/workflows/build.yml
vendored
Normal file
49
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
name: Build Proposal and Thesis
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install LaTeX
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra texlive-bibtex-extra latexmk
|
||||||
|
|
||||||
|
- name: Build Thesis
|
||||||
|
run: |
|
||||||
|
make -C thesis
|
||||||
|
|
||||||
|
- name: Build Proposal
|
||||||
|
working-directory: proposal
|
||||||
|
run: |
|
||||||
|
mkdir -p build
|
||||||
|
mkdir -p output
|
||||||
|
pdflatex -output-directory=build -interaction=nonstopmode proposal.tex
|
||||||
|
# Run bibtex if aux file exists
|
||||||
|
if [ -f build/proposal.aux ]; then
|
||||||
|
bibtex build/proposal || true
|
||||||
|
fi
|
||||||
|
pdflatex -output-directory=build -interaction=nonstopmode proposal.tex
|
||||||
|
pdflatex -output-directory=build -interaction=nonstopmode proposal.tex
|
||||||
|
cp build/proposal.pdf output/proposal.pdf
|
||||||
|
|
||||||
|
- name: Upload Thesis PDF
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: thesis-pdf
|
||||||
|
path: thesis/out/thesis.pdf
|
||||||
|
|
||||||
|
- name: Upload Proposal PDF
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: proposal-pdf
|
||||||
|
path: proposal/output/proposal.pdf
|
||||||
Reference in New Issue
Block a user