Skip to content

Commit b545811

Browse files
committed
Merge EPUB check into build-doc job
1 parent 418ad4d commit b545811

File tree

1 file changed

+11
-35
lines changed

1 file changed

+11
-35
lines changed

.github/workflows/reusable-docs.yml

Lines changed: 11 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,17 @@ jobs:
7575
--fail-if-regression \
7676
--fail-if-improved \
7777
--fail-if-new-news-nit
78+
- name: 'Build EPUB documentation and load EPUB checks to file'
79+
continue-on-error: true
80+
run: |
81+
set -Eeuo pipefail
82+
make -C Doc/ PYTHON=../python SPHINXOPTS="--quiet" epub
83+
pip install epubcheck
84+
epubcheck Doc/build/epub/Python.epub &> Doc/epubcheck.txt
85+
- name: 'Check for FATAL errors in EPUB'
86+
if: github.event_name == 'pull_request'
87+
run: |
88+
python Doc/tools/check-epub.py
7889
7990
# Run "doctest" on HEAD as new syntax doesn't exist in the latest stable release
8091
doctest:
@@ -102,38 +113,3 @@ jobs:
102113
# Use "xvfb-run" since some doctest tests open GUI windows
103114
- name: 'Run documentation doctest'
104115
run: xvfb-run make -C Doc/ PYTHON=../python SPHINXERRORHANDLING="--fail-on-warning" doctest
105-
106-
epubcheck:
107-
name: 'EPUB check'
108-
runs-on: ubuntu-latest
109-
timeout-minutes: 40
110-
steps:
111-
- name: 'Check out latest PR branch commit'
112-
uses: actions/checkout@v4
113-
with:
114-
persist-credentials: false
115-
ref: >-
116-
${{
117-
github.event_name == 'pull_request'
118-
&& github.event.pull_request.head.sha
119-
|| ''
120-
}}
121-
- name: 'Set up Python'
122-
uses: actions/setup-python@v5
123-
with:
124-
python-version: '3'
125-
cache: 'pip'
126-
cache-dependency-path: 'Doc/requirements.txt'
127-
- name: 'Install build dependencies'
128-
run: make -C Doc/ venv
129-
- name: 'Build and load EPUB checks to file'
130-
continue-on-error: true
131-
run: |
132-
set -Eeuo pipefail
133-
make -C Doc/ PYTHON=../python SPHINXOPTS="--quiet" epub
134-
pip install epubcheck
135-
epubcheck Doc/build/epub/Python.epub &> Doc/epubcheck.txt
136-
- name: 'Check for FATAL errors in EPUB'
137-
if: github.event_name == 'pull_request'
138-
run: |
139-
python Doc/tools/check-epub.py

0 commit comments

Comments
 (0)