Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 17 additions & 12 deletions .github/workflows/build_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,32 +89,37 @@ jobs:
- name: "HTML: Sphinx build html"
run: |
sphinx-build -b html source build/html
# then copy over the plugins.json from psychopy/plugins repo
curl -LO https://github.com/psychopy/plugins/raw/refs/heads/${{ github.event.inputs.pp_branch }}/plugins.json
mv plugins.json build/html

- name: "PDF: Sphinx build latex"
run: |
sphinx-build -b latex source build/latex
- name: "PDF: Cache Tectonic files"
uses: actions/cache@v5
with:
path: ~/.cache/Tectonic
key: ${{ runner.os }}-tectonic-${{ hashFiles('**/*.tex') }}
restore-keys: |
${{ runner.os }}-tectonic-
# - name: "PDF: Cache Tectonic files"
# uses: actions/cache@v5
# with:
# path: ~/.cache/Tectonic
# key: ${{ runner.os }}-tectonic-${{ hashFiles('**/*.tex') }}
# restore-keys: |
# ${{ runner.os }}-tectonic-
- name: "PDF: Set up Tectonic"
uses: wtfjoke/setup-tectonic@v4
- name: "PDF: Build PDF with Tectonic"
run: |
tectonic build/latex/PsychoPyManual.tex --outdir build/html
# try building with tectonic or fetch from psychopy.org if that fails (e.g. due to missing latex packages)
if ! tectonic build/latex/PsychoPyManual.tex --outdir build/html; then
echo "Tectonic build failed, fetching pre-built PDF from psychopy.org"
curl -L -o build/html/PsychoPyManual.pdf https://www.psychopy.org/PsychoPyManual.pdf
fi
- name: fetch plugins.json
run: |
curl -LO https://github.com/psychopy/plugins/raw/refs/heads/${{ github.event.inputs.pp_branch }}/plugins.json
mv plugins.json build/html
- name: "DEBUG: Upload docs as artifact"
uses: actions/upload-artifact@v6
with:
name: psychopy-docs
path: build/html
- name: "DEBUG: Upload PsychoPyManual.tex as artifact"
uses: actions/upload-artifact@v6
if: always() # upload even if build fails, to allow debugging of build issues
with:
name: PsychoPyManual.tex
path: build/latex/PsychoPyManual.tex
Expand Down
Loading