1
Fork 0
mirror of https://github.com/Steffo99/sophon.git synced 2024-12-22 14:54:22 +00:00
sophon/.github/workflows/build-sphinx-thesis.yml

43 lines
1.4 KiB
YAML
Raw Permalink Normal View History

2021-11-17 19:38:31 +00:00
name: Build thesis document
on:
push:
branches: [ main ]
paths:
- "thesis/**"
jobs:
html:
name: "Build HTML document"
runs-on: ubuntu-latest
steps:
- name: "Checkout repository"
uses: actions/checkout@v2
- name: "Build HTML document with Sphinx"
uses: ammaraskar/sphinx-action@master
with:
docs-folder: "thesis/"
build-command: "make html"
- name: "Create a gzip of the build"
run: "tar -xvzf thesis/_build/thesis.html.tar.gz thesis/_build/html"
- name: "Upload build artifact"
uses: actions/upload-artifact@v2
with:
name: "thesis.html.tar.gz"
path: "thesis/_build/thesis.html.tar.gz"
latexpdf:
name: "Build PDF document"
runs-on: ubuntu-latest
steps:
- name: "Checkout repository"
uses: actions/checkout@v2
- name: "Build Latex document with Sphinx"
uses: ammaraskar/sphinx-action@master
with:
docs-folder: "thesis/"
pre-build-command: "apt-get update -y && apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended"
build-command: "make latexpdf"
- name: "Upload build artifact"
uses: actions/upload-artifact@v2
with:
name: "thesis.pdf"
path: "thesis/_build/latex/sophon.pdf"