• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
5version: 2
6
7sphinx:
8   configuration: Doc/conf.py
9
10build:
11  os: ubuntu-24.04
12  tools:
13    python: "3"
14
15  commands:
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
29    - asdf plugin add uv
30    - asdf install uv latest
31    - asdf global uv latest
32    - make -C Doc venv html
33    - mkdir _readthedocs
34    - mv Doc/build/html _readthedocs/html
35
36