From 89ef4fd0cf4c086e8611ffa2992c8e479bf2904d Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Tue, 16 Apr 2024 09:41:33 +0200 Subject: [PATCH] automation: add workflow to fail on warnings during docs build --- .github/workflows/test-docs.yaml | 35 ++++++++++++++++++++++++++++++++ docs/environment.yml | 2 +- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test-docs.yaml diff --git a/.github/workflows/test-docs.yaml b/.github/workflows/test-docs.yaml new file mode 100644 index 0000000000..104b9bd4a1 --- /dev/null +++ b/.github/workflows/test-docs.yaml @@ -0,0 +1,35 @@ +# This is a GitHub workflow defining a set of jobs with a set of steps. +# ref: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions +# +name: Test docs + +on: + pull_request: + paths: + - "docs/**" + - "**/test-docs.yaml" + push: + paths: + - "docs/**" + - "**/test-docs.yaml" + branches-ignore: + - "dependabot/**" + - "pre-commit-ci-update-config" + workflow_dispatch: + +jobs: + test-docs: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.11" + + - name: Install deps + run: pip install -r docs/requirements.txt + + - name: make linkcheck + run: | + cd docs + make dirhtml SPHINXOPTS='--color -W --keep-going' diff --git a/docs/environment.yml b/docs/environment.yml index 94f1bffdab..0b5c2c2028 100644 --- a/docs/environment.yml +++ b/docs/environment.yml @@ -2,6 +2,6 @@ name: infrastructure-docs channels: - conda-forge dependencies: - - python=3.10 + - python=3.11 - pip: - -r requirements.txt