diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index 7d95adb..24247ce 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -4,6 +4,7 @@ # License: CC-0. This is the canonical location of this file, which # you may want to link to anyway: # https://github.com/coderefinery/sphinx-lesson-template/blob/main/.github/workflows/sphinx.yml +# https://raw.githubusercontent.com/coderefinery/sphinx-lesson-template/main/.github/workflows/sphinx.yml name: sphinx @@ -14,7 +15,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 @@ -61,6 +63,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 @@ -88,6 +91,7 @@ jobs: # singlehtml - name: Generate singlehtml + if: ${{ env.GENERATE_SINGLEHTML == 'true' }} run: | make singlehtml mv _build/singlehtml/ _build/dirhtml/singlehtml/ @@ -125,7 +129,7 @@ jobs: touch _gh-pages/.nojekyll # Save artifact for the next step. - - uses: actions/upload-artifact@master + - uses: actions/upload-artifact@v4 if: ${{ github.event_name == 'push' }} with: name: gh-pages-build @@ -143,7 +147,7 @@ jobs: contents: write steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 if: ${{ github.event_name == 'push' && ( env.MULTIBRANCH == 'true' || github.ref == format('refs/heads/{0}', env.DEFAULT_BRANCH )) }} with: name: gh-pages-build