.readthedocs.yaml:命令完成后需要停止

问题描述 投票:0回答:1

这是我的 .readthedocs.yaml 脚本:

# Required
version: 2

# Set the version of Python and other tools you might need
build:
  os: ubuntu-22.04
  tools:
    python: "3.12"
  apt_packages:
    - cmake
    - gfortran
    - gcc
    - g++
    - git
  jobs:
    pre_install:
      - echo "in build - jobs - pre_install:"
      - echo "READTHEDOCS_OUTPUT=$READTHEDOCS_OUTPUT "
      - pwd; ls -lt 
      - cmake --version
      - git --version
      - python -V
      - pip install "sphinx<7.0.0" sphinx_rtd_theme sphinxcontrib-bibtex
      - sphinx-build  --version
      - git submodule update --init --recursive
      - ./setup $READTHEDOCS_OUTPUT
      - pwd
      - ls -lt
      - cd $READTHEDOCS_OUTPUT/; pwd; ls -lt; make html; pwd; ls -lt; ls -lt html/ ; exit $?
      - exit 0

运行所有“pre_install”命令后,我想结束 yaml 脚本,但脚本继续执行一些不需要的默认命令(例如 python -m pip install --upgrade --no-cache-dir pip setuptools 、 python -m pip install --upgrade --no-cache-dir sphinx , cat doc/conf.py ... )并崩溃。

有关如何完全停止 yaml 脚本运行的任何帮助?

(PS:这是整个 yaml 运行,https://readthedocs.org/projects/dirac-fork/builds/26199242/,包含不需要的额外步骤)

python-sphinx read-the-docs
1个回答
0
投票

很好,在 RDT 之间进行了更新,当前的 yaml 脚本(来自 https://gitlab.com/dirac/dirac/-/blob/master/.readthedocs.yaml)如下所示:


version: 2

build:
  os: ubuntu-22.04
  tools:
    python: "3.12"
  apt_packages:
    - cmake
    - gfortran
    - gcc
    - g++
    - git
  jobs:    
    post_checkout: 
      - git submodule update --init --recursive
    install:
      - python3 -m venv venv
      - . venv/bin/activate
      - python3 -m pip install "sphinx<7.0.0" sphinx_rtd_theme sphinxcontrib-bibtex
      - pip list
      - lsb_release -a
    pre_build:
        - ./setup $READTHEDOCS_OUTPUT
    build:
      html:
        - cd $READTHEDOCS_OUTPUT; echo "I am in the directory:";pwd; make VERBOSE=1 html; cd html; echo "content of html:"; ls -lt; ls -lt _static
© www.soinside.com 2019 - 2024. All rights reserved.