Skip to content

Commit

Permalink
Merge branch 'main' into workflows/paths
Browse files Browse the repository at this point in the history
  • Loading branch information
seisman committed Jan 6, 2024
2 parents 588e997 + 24e0324 commit e4f4a12
Showing 1 changed file with 16 additions and 0 deletions.
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

0 comments on commit e4f4a12

Please sign in to comment.