Skip to content

Commit 883b993

Browse files
author
Release Manager
committed
gh-35169: CI: Add PDF doc building <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes #1234" use "Introduce new method to calculate 1+1" --> ### 📚 Description <!-- Describe your changes here in detail --> We add another workflow that is run on every PR: building PDF docs. <!-- Why is this change required? What problem does it solve? --> <!-- If it resolves an open issue, please link to the issue here. For example "Closes #1337" --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [x] I have made sure that the title is self-explanatory and the description concisely explains the PR. - [ ] I have linked an issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open pull requests that this PR logically depends on --> <!-- - #xyz: short description why this is a dependency - #abc: ... --> URL: #35169 Reported by: Matthias Köppe Reviewer(s): Dima Pasechnik, Tobias Diez
2 parents 25a0853 + 5330147 commit 883b993

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Build documentation (PDF)
2+
3+
on:
4+
pull_request:
5+
push:
6+
workflow_dispatch:
7+
# Allow to run manually
8+
9+
concurrency:
10+
# Cancel previous runs of this workflow for the same branch
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
build-docs:
16+
runs-on: ubuntu-latest
17+
# Use "maximal" so that texlive is installed
18+
# Use "fedora-31" for build diversity
19+
container: ghcr.io/sagemath/sage/sage-docker-fedora-31-maximal-with-targets:dev
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v3
23+
24+
- name: Prepare
25+
run: |
26+
apt-get update && apt-get install -y zip
27+
# Reuse built SAGE_LOCAL contained in the Docker image
28+
./bootstrap
29+
./configure --enable-build-as-root --prefix=/sage/local --with-sage-venv --enable-download-from-upstream-url
30+
31+
- name: Build
32+
run: make build V=0 && make doc-pdf
33+
env:
34+
MAKE: make -j2
35+
SAGE_NUM_THREADS: 2
36+
TEXMFHOME: /sage/texmf
37+
38+
- name: Copy docs
39+
run: |
40+
# For some reason the deploy step below cannot find /sage/...
41+
# So copy everything from there to local folder
42+
mkdir -p ./docs
43+
cp -r -L /sage/local/share/doc/sage/pdf/en/* ./docs
44+
# Zip everything for increased performance
45+
zip -r docs-pdf.zip docs
46+
47+
- name: Upload docs
48+
uses: actions/upload-artifact@v3
49+
with:
50+
name: docs-pdf
51+
path: docs-pdf.zip

0 commit comments

Comments
 (0)