Skip to content

Commit

Permalink
GH actions - Only build the docs when there are changes
Browse files Browse the repository at this point in the history
Following the ReadTheDocs guide to only build once there are actual
changes to the 'docs/' folder
  • Loading branch information
jomey committed Sep 19, 2024
1 parent 70d9616 commit 673af60
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ build:
tools:
python: "3.11"
jobs:
post_checkout:
# https://docs.readthedocs.io/en/stable/build-customization.html#cancel-build-based-on-a-condition
- |
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/main -- docs/ .readthedocs.yaml;
then
exit 183;
fi
pre_build:
# Generate the Sphinx configuration for this Jupyter Book so it builds.
- "jupyter-book config sphinx docs"
Expand Down

0 comments on commit 673af60

Please sign in to comment.