Skip to content

Commit

Permalink
do not show untouched notebooks in preview
Browse files Browse the repository at this point in the history
  • Loading branch information
malmans2 committed Oct 21, 2024
1 parent 70e09b5 commit 3f5936b
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
rm ./**/*.ipynb
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 3f5936b

Please sign in to comment.