Skip to content

Commit

Permalink
Further debug and copy source files
Browse files Browse the repository at this point in the history
  • Loading branch information
agriyakhetarpal committed Aug 29, 2023
1 parent c26fc9f commit 279cf4a
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,29 +30,22 @@ build:
# rust: "1.64"
# golang: "1.19"
jobs:
# Unshallow the git clone otherwise this may cause issues with Sphinx extensions
post_checkout:
- git fetch --unshallow
# Altered PDF build and upload job, attributed to
# https://stackoverflow.com/a/76992101/14001839
post_build:
- pwd
- ls
- mkdir --parents $READTHEDOCS_OUTPUT/pdf/
# Generate LaTeX files in docs/build/ and doctrees in docs/_build/doctrees, skipping notebooks
- python -m sphinx -T -E -b latex -d docs/_build/doctrees -D language=en docs docs/build/
- pwd
- ls
- cd docs/build/ && cat latexmkrc
- pwd
# Map non-zero exit codes to zero
- latexmk -r latexmkrc -pdf -f -dvi- -ps- -jobname=pybamm -interaction=nonstopmode || true
- pwd
- cd docs/build/ && latexmk -r latexmkrc -pdf -f -dvi- -ps- -jobname=pybamm -interaction=nonstopmode || true
# Check if pybamm.pdf exists
- pwd
- test -f pybamm.pdf && echo "pybamm.pdf exists. Copying source file to $READTHEDOCS_OUTPUT/pdf/."
- pwd
- cd ../../ && cp "docs/build/pybamm.pdf" $READTHEDOCS_OUTPUT/pdf/
- pwd
- test -f docs/build/pybamm.pdf && echo "pybamm.pdf exists. Copying source file to $READTHEDOCS_OUTPUT/pdf/."
- ls $READTHEDOCS_OUTPUT/pdf/
- cp "docs/build/pybamm.pdf" $READTHEDOCS_OUTPUT/pdf/
- ls $READTHEDOCS_OUTPUT/pdf/

# Optionally declare the Python requirements required to build your docs
Expand Down

0 comments on commit 279cf4a

Please sign in to comment.