From 428137dd9528ef70c19b44e9c29832bd7984babb Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Fri, 31 Mar 2023 11:14:17 -0400 Subject: [PATCH 1/2] add a docs test CI workflow this checks the Sphinx build and whether the links are resolvable --- .github/workflows/docs-test.yml | 49 +++++++++++++++++++++++++++++++++ doc/source/conf.py | 3 ++ 2 files changed, 52 insertions(+) create mode 100644 .github/workflows/docs-test.yml 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..f663a1a4aab 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'). From 79202f21f52f57ed41cec1d03e68dd60d1ce9619 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Fri, 31 Mar 2023 11:19:00 -0400 Subject: [PATCH 2/2] black formatting --- doc/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index f663a1a4aab..b8f55166ef7 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -208,7 +208,7 @@ htmlhelp_basename = "ytdoc" -linkcheck_exclude_documents = [r'reference/changelog'] +linkcheck_exclude_documents = [r"reference/changelog"] # -- Options for LaTeX output --------------------------------------------------