Skip to content
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
16 changes: 16 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,22 @@ build:
tools:
python: "mambaforge-4.10"
jobs:
post_checkout:
# Cancel building pull requests when there aren't changes related to docs.
# If there are no changes (git diff exits with 0) we force the command to return with 183.
# This is a special exit code on Read the Docs that will cancel the build immediately.
- |
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && \
git diff --quiet origin/main -- \
doc/ \
pygmt/**/*.py \
':!pygmt/tests' \
README.md \
ci/requirements/docs.yml \
.readthedocs.yaml;
then
exit 183;
fi
pre_build: # Generate api stub files before building
- make -C doc api

Expand Down