Skip to content

Bump actions/setup-python from 5.2.0 to 5.3.0 #329

Bump actions/setup-python from 5.2.0 to 5.3.0

Bump actions/setup-python from 5.2.0 to 5.3.0 #329

Workflow file for this run

name: Build tutorials (pull requests)
on:
pull_request:
branches:
- main
types:
# We also want this workflow triggered if the 'Run all tutorials' label
# is added or present when PR is updated
- opened
- reopened
- synchronize
- labeled
jobs:
notebooks:
name: "Execute and convert the notebooks to HTML"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: 3.12
- name: Install dependencies
run: |
sudo apt-get install pandoc
python -m pip install -U pip
python -m pip install -r requirements-dev.txt
# Run all tutorials if the label is present
- name: Run all tutorials
if: contains(github.event.pull_request.labels.*.name, 'Run all tutorials')
run: |
export TUTORIALS_MAIN_BRANCH=origin/main
make clean
make buildall
shell: bash
# Otherwise, only run tutorials that have been modified
- name: Run only modified tutorials
if: "!contains(github.event.pull_request.labels.*.name, 'Run all tutorials')"
run: |
export TUTORIALS_MAIN_BRANCH=origin/main
make build
shell: bash
- name: Name artifact
id: nameartifact
run: |
echo "::set-output name=artifactName::rendered-tutorials"
- uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: ${{ steps.nameartifact.outputs.artifactName }}
path: _build