Skip to content

Commit

Permalink
Make notebook validation only run in core_docs (#6312)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoblee93 authored Aug 1, 2024
1 parent 96fe56a commit abda1e8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/validate_new_notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,23 @@ jobs:
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
- name: Check for new or modified notebooks
- name: Check for new or modified notebooks in docs/core_docs
id: check_notebooks
run: |
notebooks=$(echo '${{ steps.changed-files.outputs.all_changed_files }}' | tr ' ' '\n' | grep '\.ipynb$' || true)
notebooks=$(echo '${{ steps.changed-files.outputs.all_changed_files }}' | tr ' ' '\n' | grep '^docs/core_docs/.*\.ipynb$' || true)
echo "Affected notebooks: $notebooks"
echo "has_affected_notebooks=$([ -n "$notebooks" ] && echo 'true' || echo 'false')" >> $GITHUB_OUTPUT
- name: Build examples
if: steps.check_notebooks.outputs.has_affected_notebooks == 'true'
run: yarn turbo:command build --filter=examples
- name: Validate affected notebooks
- name: Validate affected notebooks in docs/core_docs
if: steps.check_notebooks.outputs.has_affected_notebooks == 'true'
run: |
notebooks=$(echo '${{ steps.changed-files.outputs.all_changed_files }}' | tr ' ' '\n' | grep '\.ipynb$' || true)
notebooks=$(echo '${{ steps.changed-files.outputs.all_changed_files }}' | tr ' ' '\n' | grep '^docs/core_docs/.*\.ipynb$' || true)
if [ -n "$notebooks" ]; then
for notebook in $notebooks; do
yarn notebook:validate "$notebook"
done
else
echo "No notebooks to validate."
echo "No notebooks in docs/core_docs to validate."
fi

0 comments on commit abda1e8

Please sign in to comment.