Skip to content

Commit

Permalink
pdf: insert cover
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Oct 4, 2023
1 parent 4efd6b8 commit 0d7ff50
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ jobs:
jupyter-book build --builder latex .
env:
PYTHONPATH: .
- name: insert PDF cover
run: |
curl -fsSL https://static.premai.io/book/cover.pdf > _build/latex/cover.pdf
sed -i -r \
-e 's/(\\usepackage\{geometry\})/\1\n\\usepackage\{pdfpages\}/' \
-e 's/\\sphinxmaketitle/\\includepdf\[pages=-\]\{cover.pdf\}\n\\maketitle/' \
-e 's/\\sphinxtableofcontents//' \
_build/latex/book.tex
- uses: xu-cheng/latex-action@v2
with:
working_directory: _build/latex
Expand Down

0 comments on commit 0d7ff50

Please sign in to comment.