Skip to content

Instantly share code, notes, and snippets.

@iTrauco
Last active June 24, 2025 02:32
Show Gist options
  • Save iTrauco/858f9af3ffccac1cd5f8d5388513a85e to your computer and use it in GitHub Desktop.
Save iTrauco/858f9af3ffccac1cd5f8d5388513a85e to your computer and use it in GitHub Desktop.
name: Convert Notebooks to Markdown
on:
push:
paths: ['**.ipynb']
jobs:
convert:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install jupyter
run: pip install jupyter
- name: Convert notebooks to markdown
run: |
find . -name "*.ipynb" ! -name "*.working.ipynb" ! -name "*.dev.ipynb" -exec jupyter nbconvert --to markdown {} \;
- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "iTrauco"
git add -A
git commit -m "Convert notebooks to markdown" || echo "No changes to commit"
git push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment