Skip to content

Bugfix print submit opts on err #13

Bugfix print submit opts on err

Bugfix print submit opts on err #13

Workflow file for this run

name: Generate Documentation
on:
pull_request:
types: [ opened, synchronize ]
paths:
- tutorials/**
- .github/workflows/gendocs.yml
jobs:
markdowndocs:
name: "Generate Tutorials Markdown"
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Checkout PR
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh pr checkout ${{ github.event.pull_request.number }}
- uses: actions/setup-python@v4
with:
cache: 'pip' # caching pip dependencies
- run: pip install nbconvert notebook
- name: Run all tutorials
run: |
for notebook in $( ls ./tutorials/*.ipynb ); do
# --execute is hot garbage compared to manual execution, they produce different file outputs
# which leads to weird newlines as code output stdout streams separate EVERY line as individual outputs
jupyter nbconvert --execute --inplace $notebook
./tutorials/sanitizer.py $notebook
jupyter nbconvert --to=markdown $notebook
jupyter nbconvert --clear-output --inplace $notebook
done
- name: Update documentation
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.email "[email protected]"
git config user.name "Anthony Islas"
git add ./tutorials/*.md
ret=$( git diff --cached --quiet; echo $? )
if [ $ret -ne 0 ]; then
git status
git commit -m "Generating tutorials markdown"
git push
else
echo "Nothing to commit"
fi