Skip to content

Commit 050ab21

Browse files
committed
CI: Build PDF documentation using tectonic
1 parent 2bd524e commit 050ab21

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

.github/workflows/ci_docs.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ jobs:
117117
sphinx-design
118118
sphinx-gallery
119119
sphinx_rtd_theme<3.0
120+
tectonic
120121
121122
# Download cached remote files (artifacts) from GitHub
122123
- name: Download remote data from GitHub
@@ -137,7 +138,15 @@ jobs:
137138
138139
# Build the documentation
139140
- name: Build the documentation
140-
run: make -C doc clean all
141+
run: make -C doc clean html pdf
142+
143+
# Temporarily upload the built PDF to the artifacts
144+
- name: Upload PDF to artifacts
145+
uses: actions/[email protected]
146+
with:
147+
name: pygmt-docs-pdf
148+
path: doc/_build/latex/pygmt.pdf
149+
if: matrix.os == 'ubuntu-latest'
141150

142151
- name: Checkout the gh-pages branch
143152
uses: actions/[email protected]

doc/Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ html-noplot: api
4343
@echo
4444
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
4545

46+
pdf: latex
47+
@echo
48+
@echo "Building PDF via Tectonic."
49+
@echo
50+
tectonic $(BUILDDIR)/latex/pygmt.tex
51+
@echo
52+
@echo "PDF build finished. The PDF file is in $(BUILDDIR)/latex/pygmt.pdf."
53+
4654
server:
4755
@echo
4856
@echo "Running a server on port 8009."

0 commit comments

Comments
 (0)