Skip to content

Commit

Permalink
Merge pull request #6 from astro-datalab/edge-case-kf
Browse files Browse the repository at this point in the history
Changed workflow and removed html file
  • Loading branch information
KeenanFiedler authored Jun 20, 2024
2 parents 7235fe9 + c1134bf commit a70af28
Showing 1 changed file with 13 additions and 2 deletions.
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

0 comments on commit a70af28

Please sign in to comment.