Skip to content

Commit

Permalink
chore: add templates/ to nbfmt workflow
Browse files Browse the repository at this point in the history
Only the nbfmt workflow though - nblint still only operates on site
contents.
  • Loading branch information
markmcd committed Jan 9, 2024
1 parent b48ab05 commit 2db5839
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
pull_request:
paths:
- "site/en/**"
- "templates/**"
# Allow manual runs
workflow_dispatch:

Expand All @@ -28,7 +29,7 @@ jobs:
readarray -t changed_notebooks < <(git diff --name-only main | grep '\.ipynb$' || true)
else
# Manual run, check everything
readarray -t changed_notebooks < <(find site/en/ -name '*.ipynb')
readarray -t changed_notebooks < <(find site/en/ templates/ -name '*.ipynb')
fi
if [[ ${#changed_notebooks[@]} == 0 ]]; then
echo "No notebooks modified in this pull request."
Expand All @@ -52,7 +53,7 @@ jobs:
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
# Only check notebooks modified in this pull request
readarray -t changed_notebooks < <(git diff --name-only main | grep '\.ipynb$' || true)
readarray -t changed_notebooks < <(git diff --name-only main | grep '\.ipynb$' |grep -v '^templates/' || true)
else
# Manual run, check everything
readarray -t changed_notebooks < <(find site/en/ -name '*.ipynb')
Expand Down

0 comments on commit 2db5839

Please sign in to comment.