Skip to content

Commit

Permalink
.github/workflows/sphinx: Add singlehtml generation
Browse files Browse the repository at this point in the history
  • Loading branch information
rkdarst committed Oct 8, 2023
1 parent de33b95 commit a9b5889
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ env:
# If these SPHINXOPTS are enabled, then be strict about the
# builds and fail on any warnings.
#SPHINXOPTS: "-W --keep-going -T"
GENERATE_PDF: true # to enable, must be 'true' lowercase
GENERATE_PDF: true # to enable, must be 'true' lowercase
GENERATE_SINGLEHTML: true # to enable, must be 'true' lowercase
PDF_FILENAME: lesson.pdf
MULTIBRANCH: true # to enable, must be 'true' lowercase

Expand Down Expand Up @@ -61,6 +62,7 @@ jobs:
echo "github.head_ref: ${head_ref}"
echo "github.base_ref: ${base_ref}"
echo "GENERATE_PDF: ${GENERATE_PDF}"
echo "GENERATE_SINGLEHTML: ${GENERATE_SINGLEHTML}"
set -x
git rev-parse --abbrev-ref HEAD
git branch
Expand All @@ -86,6 +88,13 @@ jobs:
# https://github.com/readthedocs/sphinx_rtd_theme/pull/1025
sed -i 's/url_root="#"/url_root=""/' _build/dirhtml/index.html || true
# singlehtml
- name: Generate singlehtml
if: ${{ env.GENERATE_SINGLEHTML == 'true' }}
run: |
make singlehtml
mv _build/singlehtml/ _build/dirhtml/singlehtml/
# PDF if requested
- name: Generate PDF
if: ${{ env.GENERATE_PDF == 'true' }}
Expand Down

0 comments on commit a9b5889

Please sign in to comment.