diff --git a/.github/sphinx-problem-matcher.json b/.github/sphinx-problem-matcher.json new file mode 100644 index 000000000..0bfcf0ef4 --- /dev/null +++ b/.github/sphinx-problem-matcher.json @@ -0,0 +1,15 @@ +{ + "problemMatcher": [ + { + "owner": "sphinx", + "pattern": [ + { + "regexp": "^([^:]+):(\\d+): (WARNING: )?(.+)$", + "file": 1, + "line": 2, + "message": 4 + } + ] + } + ] +} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 20847586a..855f9d731 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -118,7 +118,11 @@ jobs: - name: Install dependencies run: poetry install --only=docs - - uses: sphinx-doc/github-problem-matcher@master - name: Build docs - with: - run: poe docs + - name: Add Sphinx problem matcher + run: echo "::add-matcher::.github/sphinx-problem-matcher.json" + + - name: Build docs + run: | + poe docs |& tee /tmp/output + # fail the job if there are issues + grep -q " WARNING:" /tmp/output && exit 1 || exit 0