Skip to content

Commit

Permalink
do not show untouched notebooks in preview (#235)
Browse files Browse the repository at this point in the history
* do not show untouched notebooks in preview

* fix script

* cleanup

* test

* test

* revert tests
  • Loading branch information
malmans2 authored Oct 22, 2024
1 parent 70e09b5 commit 74920f5
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/on-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,25 @@ jobs:
with:
python-version: '3.x'
cache: 'pip'
- uses: actions/checkout@v4
- name: Get changed notebooks
id: changed-files
uses: tj-actions/changed-files@v45
with:
files: |
**.ipynb
- name: Remove untouched notebooks
id: remove-untouched-notebooks
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |-
for file in ${ALL_CHANGED_FILES}; do
mv "$file" "$file".keep
done
find . -type f -name "*.ipynb" -not -path "./templates/*" -exec rm -f {} +
for file in ${ALL_CHANGED_FILES}; do
mv "$file".keep "$file"
done
- run: pip install -r requirements.txt
- run: make build-book PRE_BUILD_DIR=${{ env.PRE_BUILD_DIR }} PRE_BUILD_FLAGS=${{ env.PRE_BUILD_FLAGS }}
- uses: rossjrw/pr-preview-action@v1
Expand Down

0 comments on commit 74920f5

Please sign in to comment.