Skip to content

Merge pull request #612 from jeffjennings/build_cleanup #256

Merge pull request #612 from jeffjennings/build_cleanup

Merge pull request #612 from jeffjennings/build_cleanup #256

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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- 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
- 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@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
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 }}"}'