Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed workflow and removed html file #6

Merged
merged 6 commits into from
Jun 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions .github/workflows/make_html_from_notebook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ on:
# Trigger on PRs that change the notebooks in some way
pull_request:
branches: [main]
paths: "**.ipynb"
paths:
- "**.ipynb"
- "**.html"
#pull_request_review:
#types: [submitted]
jobs:
Expand Down Expand Up @@ -36,6 +38,15 @@ jobs:
for changed_file in ${{ steps.changes.outputs.added_modified }}; do
if [[ "$changed_file" == *".ipynb" ]]; then
notebooks+=("$changed_file")
elif [[ "$changed_file" == *".html" ]]; then
striped="${changed_file%.*}.ipynb"
notebooks+=("$striped")
fi
done
for changed_file in ${{ steps.changes.outputs.removed }}; do
if [[ "$changed_file" == *".html" ]]; then
striped="${changed_file%.*}.ipynb"
notebooks+=("$striped")
fi
done
echo "Changed files: ${notebooks[@]}"
Expand All @@ -47,4 +58,4 @@ jobs:
git config user.email [email protected]
git add -A
git commit -m "Automated commit for HTML files" || exit 0
git push
git push