]>
Commit | Line | Data |
---|---|---|
accb417c HK |
1 | # Read the Docs configuration file |
2 | # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | |
3 | # Project page: https://readthedocs.org/projects/cpython-previews/ | |
4 | ||
5 | version: 2 | |
6 | ||
7 | sphinx: | |
8 | configuration: Doc/conf.py | |
9 | ||
10 | build: | |
11 | os: ubuntu-22.04 | |
12 | tools: | |
13 | python: "3" | |
14 | ||
15 | commands: | |
c3204ed7 HK |
16 | # https://docs.readthedocs.io/en/stable/build-customization.html#cancel-build-based-on-a-condition |
17 | # | |
18 | # Cancel building pull requests when there aren't changes in the Doc directory. | |
19 | # | |
20 | # If there are no changes (git diff exits with 0) we force the command to return with 183. | |
21 | # This is a special exit code on Read the Docs that will cancel the build immediately. | |
22 | - | | |
23 | if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && [ "$(git diff --quiet origin/main -- Doc/ .readthedocs.yml; echo $?)" -eq 0 ]; | |
24 | then | |
25 | echo "No changes to Doc/ - exiting the build."; | |
26 | exit 183; | |
27 | fi | |
28 | ||
accb417c HK |
29 | - make -C Doc venv html |
30 | - mkdir _readthedocs | |
31 | - mv Doc/build/html _readthedocs/html | |
c3204ed7 | 32 |