diff --git a/.github/workflows/docs-test.yml b/.github/workflows/docs-test.yml new file mode 100644 index 00000000000..bb45312bdda --- /dev/null +++ b/.github/workflows/docs-test.yml @@ -0,0 +1,49 @@ +name: docs build + +on: + push: + branches: + - development + - main + pull_request: + branches: + - development + +jobs: + docs: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Install pandoc and doxygen + run: | + sudo apt install pandoc doxygen + + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: Cache pip + uses: actions/cache@v3 + with: + # this path is specific to Ubuntu + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Install dependencies + run: pip install -r ./requirements.txt + + - name: Build docs + run: | + cd docs/ + make SPHINXOPTS=-v html + + - name: Check links + run: | + cd docs/ + make SPHINXOPTS=-v linkcheck diff --git a/doc/source/conf.py b/doc/source/conf.py index 44d81ce80bf..b8f55166ef7 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -208,6 +208,9 @@ htmlhelp_basename = "ytdoc" +linkcheck_exclude_documents = [r"reference/changelog"] + + # -- Options for LaTeX output -------------------------------------------------- # The paper size ('letter' or 'a4').