Skip to content

Commit

Permalink
Conditionally skip docs PR build
Browse files Browse the repository at this point in the history
If there is no change to the docs folder or RTD YAML
compared to the amd-staging branch
  • Loading branch information
samjwu committed Aug 19, 2024
1 parent 5596971 commit ef51dc6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
13 changes: 13 additions & 0 deletions amd/hipcc/.readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,16 @@ build:
os: ubuntu-22.04
tools:
python: "3.10"
jobs:
post_checkout:
# Cancel building pull requests when there aren't changed in the docs directory or YAML file.
# You can add any other files or directories that you'd like here as well,
# like your docs requirements file, or other files that will change your docs build.
#
# 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/amd-staging -- docs/ .readthedocs.yaml;
then
exit 183;
fi
13 changes: 13 additions & 0 deletions openmp/.readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,16 @@ build:
os: ubuntu-22.04
tools:
python: "3.10"
jobs:
post_checkout:
# Cancel building pull requests when there aren't changed in the docs directory or YAML file.
# You can add any other files or directories that you'd like here as well,
# like your docs requirements file, or other files that will change your docs build.
#
# 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/amd-staging -- docs/ .readthedocs.yaml;
then
exit 183;
fi

0 comments on commit ef51dc6

Please sign in to comment.