1212
1313 runs-on : ubuntu-latest
1414 steps :
15- - uses : actions/checkout@v2
15+ - name : Checkout
16+ uses : actions/checkout@v3
1617 - name : Set up Python
17- uses : actions/setup-python@v2
18+ uses : actions/setup-python@v4
1819 with :
1920 python-version : ' 3.10'
2021 - name : Setup Linux Environment
@@ -36,17 +37,26 @@ jobs:
3637 if [ "${{ matrix.doc-type }}" = html ]; then echo "art_path=docs/build-html" >> $GITHUB_ENV; fi
3738 if [ "${{ matrix.doc-type }}" = latex ]; then echo "art_path=docs/build-latex/MicroStructPy.pdf" >> $GITHUB_ENV; fi
3839 if [ "${{ matrix.doc-type }}" = epub ]; then echo "art_path=docs/build-epub/MicroStructPy.epub" >> $GITHUB_ENV; fi
40+
41+ - name : Build PDF (latex only)
42+ if : matrix.doc-type == 'latex'
43+ run : |
44+ # Update apt
45+ sudo apt-get update
3946
40- # Build PDF
41- if [ "${{ matrix.doc-type }}" = latex ]; then sudo apt install texlive-fonts-recommended; fi
42- if [ "${{ matrix.doc-type }}" = latex ]; then sudo apt install texlive-latex-recommended; fi
43- if [ "${{ matrix.doc-type }}" = latex ]; then sudo apt install texlive-lang-english; fi
44- if [ "${{ matrix.doc-type }}" = latex ]; then sudo apt install texlive-xetex; fi
45- if [ "${{ matrix.doc-type }}" = latex ]; then sudo apt install latexmk; fi
46- if [ "${{ matrix.doc-type }}" = latex ]; then cd docs/build-latex; fi
47- if [ "${{ matrix.doc-type }}" = latex ]; then make; fi
48- if [ "${{ matrix.doc-type }}" = latex ]; then cd -; fi
49-
47+ # Install LaTeX packages
48+ # Recommended by Sphinx on their docs page:
49+ # https://www.sphinx-doc.org/en/master/usage/builders/index.html#sphinx.builders.latex.LaTeXBuilder
50+ sudo apt install texlive-latex-recommended
51+ sudo apt install texlive-fonts-recommended
52+ sudo apt install tex-gyre # (if latex_engine left to default)
53+ sudo apt install texlive-latex-extra
54+ sudo apt install latexmk
55+
56+ # Make
57+ cd docs/build-latex
58+ make
59+ cd -
5060
5161 - name : Upload artifact
5262 uses : actions/upload-artifact@v3
0 commit comments