Skip to content

Commit

Permalink
Merge branch 'main' into debug-pr-preview-part-3
Browse files Browse the repository at this point in the history
  • Loading branch information
ogrisel committed Oct 30, 2023
2 parents 3c4237d + f39b464 commit 298a74a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/deploy-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ jobs:
v2-refs/heads/main
- name: Build the JupyterBook
env:
GITHUB_PULL_REQUEST_NUMBER: ${{github.event.number}}
run: |
bash build_tools/build_jupyter_book.sh
Expand Down
6 changes: 4 additions & 2 deletions build_tools/build_jupyter_book.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,18 @@ write_changed_html() {
if [ -n "$GITHUB_PULL_REQUEST_NUMBER" ]
then
GITHUB_PULL_REQUEST_URL="https://github.com/inria/scikit-learn-mooc/pull/$GITHUB_PULL_REQUEST_NUMBER"
echo "The following files may have been changed by PR $GITHUB_PR_NUMBER:"
echo "The following files may have been changed by PR $GITHUB_PULL_REQUEST_NUMBER:"
echo "$affected"
(
echo '<html><body>'
echo 'Files changed by PR <a href="'"$GITHUB_PR_URL"'">'"$GITHUB_PR_URL</a>"
echo "Files changed by PR <a href=\"$GITHUB_PULL_REQUEST_URL\">$GITHUB_PULL_REQUEST_URL</a>"
echo '<ul>'
echo "$affected" | sed 's|.*|<li><a href="&">&</a> [<a href="https://inria.github.io/scikit-learn-mooc/&">main</a>]|'
echo '</ul><p>This PR JupyterBook <a href="index.html">index</a>'
echo '</ul></body></html>'
) > "$jupyter_book_build_dir/_changed.html"
else
echo "The variable 'GITHUB_PULL_REQUEST_NUMBER' is not defined: not writing the '_changed.html' file."
fi
}

Expand Down

0 comments on commit 298a74a

Please sign in to comment.