Skip to content

Commit

Permalink
Merge pull request #65 from premAI-io/cover
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Oct 4, 2023
2 parents 4efd6b8 + 1cd741b commit 6926268
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with: {fetch-depth: 0}
- uses: actions/setup-python@v4
with: {python-version: '3.x'}
Expand Down Expand Up @@ -43,9 +43,17 @@ jobs:
#jupyter-book build --builder linkcheck --warningiserror --nitpick --keep-going .
jupyter-book build --builder dirhtml --warningiserror --nitpick --keep-going .
jupyter-book build --builder latex .
# insert PDF cover
cd _build/latex
curl -fsSLO https://static.premai.io/book/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//' \
book.tex
env:
PYTHONPATH: .
- uses: xu-cheng/latex-action@v2
- uses: xu-cheng/latex-action@v3
with:
working_directory: _build/latex
root_file: book.tex
Expand Down

0 comments on commit 6926268

Please sign in to comment.