Skip to content

Merge pull request #621 from astropy/dependabot/github_actions/action… #252

Merge pull request #621 from astropy/dependabot/github_actions/action…

Merge pull request #621 from astropy/dependabot/github_actions/action… #252

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@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@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 }}"}'