Skip to content

Commit 375cb0c

Browse files
authored
Only build PDF when deploying (#2435)
Saves a couple minutes on the CI
1 parent b7988c8 commit 375cb0c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/docs.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,21 @@ jobs:
3232
run: |
3333
sudo apt-get update
3434
sudo apt-get install -y python3-sphinx
35-
# See https://www.sphinx-doc.org/en/master/usage/builders/index.html#sphinx.builders.latex.LaTeXBuilder
36-
sudo apt-get install -y texlive-latex-recommended texlive-fonts-recommended texlive-fonts-extra tex-gyre texlive-latex-extra latexmk
3735
sphinx-build --version
3836
3937
- name: "Build documentation"
4038
run: |
4139
cd doc
4240
make html SPHINXOPTS="-W -j auto"
4341
42+
- name: "Setup LaTeX"
43+
if: github.repository == 'flintlib/flint' && github.event_name == 'push' && github.ref == 'refs/heads/main'
44+
run: |
45+
# See https://www.sphinx-doc.org/en/master/usage/builders/index.html#sphinx.builders.latex.LaTeXBuilder
46+
sudo apt-get install -y texlive-latex-recommended texlive-fonts-recommended texlive-fonts-extra tex-gyre texlive-latex-extra latexmk
47+
4448
- name: "Build PDF documentation"
49+
if: github.repository == 'flintlib/flint' && github.event_name == 'push' && github.ref == 'refs/heads/main'
4550
run: |
4651
cd doc
4752
make latexpdf SPHINXOPTS="-W -j auto"

0 commit comments

Comments
 (0)