Skip to content

Commit e0b7c04

Browse files
authored
ci/docs: enable dispatch build without warning as errors (#19948)
1 parent 5aadfa6 commit e0b7c04

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/docs-build.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,14 @@ jobs:
108108
- name: Full build for deployment
109109
if: github.event_name != 'pull_request'
110110
run: echo "DOCS_FETCH_ASSETS=1" >> $GITHUB_ENV
111+
- name: Build without warnings
112+
if: github.event_name != 'workflow_dispatch'
113+
run: echo "BUILD_SPHINX_OPTS=-W --keep-going" >> $GITHUB_ENV
111114
- name: Make ${{ matrix.target }}
112115
working-directory: ./docs/source-${{ matrix.pkg-name }}
113116
# allow failing link check and doctest if you run with dispatch
114-
continue-on-error: ${{ (matrix.target == 'doctest' || matrix.target == 'linkcheck') && github.event_name == 'workflow_dispatch' }}
115-
run: make ${{ matrix.target }} --debug --jobs $(nproc) SPHINXOPTS="-W --keep-going"
117+
continue-on-error: ${{ (matrix.target == 'doctest' || matrix.target == 'linkcheck') && github.event_name == 'workflow_dispatch' }}
118+
run: make ${{ matrix.target }} --debug --jobs $(nproc) SPHINXOPTS="$BUILD_SPHINX_OPTS"
116119

117120
- name: Keep artifact
118121
if: github.event_name == 'pull_request'

0 commit comments

Comments
 (0)