Skip to content

Commit 822fbf0

Browse files
committed
build assets prior to html for quantecon-book-theme
1 parent b39a5e3 commit 822fbf0

File tree

3 files changed

+25
-17
lines changed

3 files changed

+25
-17
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,24 @@ jobs:
3939
branch: main
4040
name: build-cache
4141
path: _build
42-
- name: Build HTML
42+
# Build Assets (Download Notebooks and PDF via LaTeX)
43+
- name: Build PDF from LaTeX
4344
shell: bash -l {0}
4445
run: |
45-
jb build -W --keep-going lectures --path-output ./
46+
jb build lectures --builder pdflatex --path-output ./ -n --keep-going
47+
mkdir -p _build/html/_pdf
48+
cp -u _build/latex/*.pdf _build/html/_pdf
4649
- name: Build Download Notebooks (sphinx-tojupyter)
4750
shell: bash -l {0}
4851
run: |
4952
jb build lectures --path-output ./ --builder=custom --custom-builder=jupyter
5053
mkdir -p _build/html/_notebooks
5154
cp -u _build/jupyter/*.ipynb _build/html/_notebooks
52-
- name: Build PDF from LaTeX
55+
# Build HTML (Website)
56+
- name: Build HTML
5357
shell: bash -l {0}
5458
run: |
55-
jb build lectures --builder pdflatex --path-output ./ -n --keep-going
56-
mkdir _build/html/_pdf
57-
cp -u _build/latex/*.pdf _build/html/_pdf
59+
jb build -W --keep-going lectures --path-output ./
5860
- name: Save Build as Artifact
5961
uses: actions/upload-artifact@v1
6062
with:

.github/workflows/publish.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,16 @@ jobs:
3636
- name: Display Pip Versions
3737
shell: bash -l {0}
3838
run: pip list
39-
- name: Build HTML
39+
# Build Assets (Download Notebooks and PDF via LaTeX)
40+
- name: Build PDF from LaTeX
4041
shell: bash -l {0}
4142
run: |
42-
jb build lectures --path-output ./
43+
jb build lectures --builder pdflatex --path-output ./ -n --keep-going
44+
- name: Copy LaTeX PDF for GH-PAGES
45+
shell: bash -l {0}
46+
run: |
47+
mkdir _build/html/_pdf
48+
cp _build/latex/*.pdf _build/html/_pdf
4349
- name: Build Download Notebooks (sphinx-tojupyter)
4450
shell: bash -l {0}
4551
run: |
@@ -52,17 +58,13 @@ jobs:
5258
- name: Copy Download Notebooks for GH-PAGES
5359
shell: bash -l {0}
5460
run: |
55-
mkdir _build/html/_notebooks
56-
cp _build/jupyter/*.ipynb _build/html/_notebooks
57-
- name: Build PDF from LaTeX
58-
shell: bash -l {0}
59-
run: |
60-
jb build lectures --builder pdflatex --path-output ./ -n --keep-going
61-
- name: Copy LaTeX PDF for GH-PAGES
61+
mkdir -p _build/html/_notebooks
62+
cp -u _build/jupyter/*.ipynb _build/html/_notebooks
63+
# Build HTML (Website)
64+
- name: Build HTML
6265
shell: bash -l {0}
6366
run: |
64-
mkdir _build/html/_pdf
65-
cp _build/latex/*.pdf _build/html/_pdf
67+
jb build lectures --path-output ./
6668
- name: Deploy website to gh-pages
6769
uses: peaceiris/actions-gh-pages@v3
6870
with:

lectures/_config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ bibtex_bibfiles:
1313
html:
1414
baseurl: https://python.quantecon.org/
1515

16+
latex:
17+
latex_documents:
18+
targetname: quantecon-python.tex
19+
1620
sphinx:
1721
extra_extensions: [sphinx_multitoc_numbering, sphinxext.rediraffe, sphinx_tojupyter]
1822
config:

0 commit comments

Comments
 (0)