better actions #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test README.ipynb | |
on: [pull_request] | |
jobs: | |
test_readme: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install jupyter | |
pip install nbconvert | |
pip install black_nbconvert | |
pip install markupsafe==2.0.1 | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
- name: Clear and format Jupyter Notebook output | |
run: | | |
jupyter nbconvert --clear-output --inplace *.ipynb | |
black_nbconvert . | |
- name: Convert README ipynb to md | |
run: | | |
rm -rf README_files | |
jupyter nbconvert --to markdown --execute README.ipynb |