Skip to content

Commit

Permalink
.github/workflows/sphinx: update workflow file to latest standard
Browse files Browse the repository at this point in the history
  • Loading branch information
rkdarst committed Feb 27, 2024
1 parent 91efe59 commit 75d8429
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -88,6 +91,7 @@ jobs:
# singlehtml
- name: Generate singlehtml
if: ${{ env.GENERATE_SINGLEHTML == 'true' }}
run: |
make singlehtml
mv _build/singlehtml/ _build/dirhtml/singlehtml/
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 75d8429

Please sign in to comment.