Skip to content

Build tutorials

Build tutorials #250

Workflow file for this run

name: Build tutorials
on:
push:
branches:
- main
release:
types:
- published
schedule:
- cron: "0 10 * * 1" # Mondays @ 6AM Eastern
jobs:
notebooks:
name: "Execute and convert the notebooks to HTML"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Set up Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.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
- name: Execute the notebooks
run: |
make executeall
shell: bash
- name: Convert the notebooks to HTML
run: |
make convertall
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
- name: Dispatch Learn Astropy deployment
uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # v3.0.0
if: ${{ (github.event_name == 'push') && (github.ref == 'refs/heads/main') && (github.repository == 'astropy/astropy-tutorials')}}
with:
token: ${{ secrets.DISPATCH_GITHUB_TOKEN }}
repository: astropy/learn-astropy
event-type: tutorials-build
client-payload: '{"artifactName": "${{ steps.nameartifact.outputs.artifactName }}", "runid": "${{ github.run_id }}", "repo": "${{ github.repository }}"}'