Skip to content

Commit fa1653b

Browse files
authored
Merge pull request #120 from samjwu/rtd-condition
Conditionally skip docs PR build
2 parents 50a97b7 + 338e03c commit fa1653b

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

amd/hipcc/.readthedocs.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,16 @@ build:
1616
os: ubuntu-22.04
1717
tools:
1818
python: "3.10"
19+
jobs:
20+
post_checkout:
21+
# Cancel building pull requests when there aren't changed in the docs directory or YAML file.
22+
# You can add any other files or directories that you'd like here as well,
23+
# like your docs requirements file, or other files that will change your docs build.
24+
#
25+
# If there are no changes (git diff exits with 0) we force the command to return with 183.
26+
# This is a special exit code on Read the Docs that will cancel the build immediately.
27+
- |
28+
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/amd-staging -- docs/ .readthedocs.yaml;
29+
then
30+
exit 183;
31+
fi

openmp/.readthedocs.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,16 @@ build:
1616
os: ubuntu-22.04
1717
tools:
1818
python: "3.10"
19+
jobs:
20+
post_checkout:
21+
# Cancel building pull requests when there aren't changed in the docs directory or YAML file.
22+
# You can add any other files or directories that you'd like here as well,
23+
# like your docs requirements file, or other files that will change your docs build.
24+
#
25+
# If there are no changes (git diff exits with 0) we force the command to return with 183.
26+
# This is a special exit code on Read the Docs that will cancel the build immediately.
27+
- |
28+
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/amd-staging -- docs/ .readthedocs.yaml;
29+
then
30+
exit 183;
31+
fi

0 commit comments

Comments
 (0)