Skip to content

Commit fce2dc0

Browse files
Copilotm-aciek
andcommitted
Add experimental build with rinohtype as PDF builder alternative
Co-authored-by: m-aciek <9288014+m-aciek@users.noreply.github.com>
1 parent aafadc5 commit fce2dc0

1 file changed

Lines changed: 27 additions & 2 deletions

File tree

.github/workflows/build.yaml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,31 @@ jobs:
154154
name: docs-pdf-a4.tar.bz2
155155
path: ./Doc/dist/python-${{ github.event.inputs.dist_version }}-docs-pdf-a4.tar.bz2
156156
if-no-files-found: ignore
157+
build-pdf-rinoh:
158+
runs-on: ubuntu-latest
159+
continue-on-error: true
160+
steps:
161+
- uses: actions/setup-python@master
162+
with:
163+
python-version: 3
164+
- uses: actions/checkout@master
165+
with:
166+
repository: ${{ github.event.inputs.repository }}
167+
ref: ${{ github.event.inputs.reference }}
168+
- run: make venv
169+
working-directory: ./Doc
170+
- run: ./venv/bin/pip install rinohtype
171+
working-directory: ./Doc
172+
- run: ./venv/bin/sphinx-build -b rinoh . build/rinoh
173+
working-directory: ./Doc
174+
- uses: actions/upload-artifact@master
175+
if: always()
176+
with:
177+
name: docs-pdf-rinoh
178+
path: ./Doc/build/rinoh/
179+
if-no-files-found: ignore
157180
publish:
158-
needs: [build-html, build-text, build-texinfo, build-epub, build-pdf]
181+
needs: [build-html, build-text, build-texinfo, build-epub, build-pdf, build-pdf-rinoh]
159182
if: ${{ !cancelled() && github.event.inputs.publish == 'true' }}
160183
runs-on: ubuntu-latest
161184
steps:
@@ -185,13 +208,15 @@ jobs:
185208
cp artifacts/docs-texinfo.tar.bz2/python-${{ github.event.inputs.dist_version }}-docs-texinfo.tar.bz2 gh-pages/3/ 2>/dev/null || true
186209
# EPUB
187210
cp artifacts/docs.epub/python-${{ github.event.inputs.dist_version }}-docs.epub gh-pages/3/ 2>/dev/null || true
211+
# PDF (rinohtype, experimental)
212+
cp artifacts/docs-pdf-rinoh/*.pdf gh-pages/3/ 2>/dev/null || true
188213
- name: Commit generated archives
189214
id: commit
190215
run: |
191216
cd gh-pages
192217
git config user.name github-actions
193218
git config user.email github-actions@github.com
194-
git add 3/python-${{ github.event.inputs.dist_version }}-docs-* || true
219+
git add 3/python-${{ github.event.inputs.dist_version }}-docs-* 3/*.pdf || true
195220
if git diff --cached --quiet; then
196221
echo "No documentation archives to commit"
197222
echo "has_changes=false" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)