Auto format notebooks #480
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: Notebooks | |
on: | |
# Relevant PRs | |
pull_request: | |
paths: | |
- "**.ipynb" | |
# Allow manual runs | |
workflow_dispatch: | |
jobs: | |
# Format all notebooks. | |
nbfmt: | |
name: Notebook format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
# Checkout PR branch for PR events, main branch for manual runs | |
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || 'main' }} | |
fetch-depth: 0 # Fetch all history to avoid issues with rebasing | |
- uses: actions/setup |