Skip to content

Commit bb743b5

Browse files
committed
fixup! chore(ci): faster build
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
1 parent b551cfc commit bb743b5

1 file changed

Lines changed: 42 additions & 10 deletions

File tree

.github/workflows/sphinxbuild.yml

Lines changed: 42 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ jobs:
1515

1616
name: Build ${{ matrix.manual.name }}
1717
runs-on: ubuntu-latest
18-
container:
19-
image: ghcr.io/nextcloud/continuous-integration-documentation:documentation-16
2018

2119
strategy:
2220
matrix:
@@ -59,15 +57,48 @@ jobs:
5957
6058
- name: Checkout repository
6159
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
62-
63-
- name: Verify Python version
64-
run: python3 --version
65-
66-
- name: Build html documentation
60+
61+
- name: Cache LaTeX apt packages
62+
if: ${{ matrix.manual.build_pdf_path }}
63+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
64+
with:
65+
path: /var/cache/apt/archives
66+
key: latex-apt-${{ runner.os }}-${{ hashFiles('.github/workflows/*.yml') }}
67+
restore-keys: |
68+
latex-apt-${{ runner.os }}-
69+
70+
- name: Fix apt cache permissions
71+
if: ${{ matrix.manual.build_pdf_path }}
72+
run: sudo chmod -R a+r /var/cache/apt/archives
73+
74+
- name: Install LaTeX dependencies
75+
if: ${{ matrix.manual.build_pdf_path }}
6776
run: |
68-
pip install --break-system-packages -r requirements.txt
69-
cd ${{ matrix.manual.directory }}
70-
make ${{ matrix.manual.make_target }}
77+
sudo DEBIAN_FRONTEND=noninteractive apt-get update
78+
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \
79+
--no-install-recommends \
80+
python3-pil \
81+
python3-pip \
82+
texlive-fonts-recommended \
83+
latexmk \
84+
texlive-latex-extra \
85+
texlive-latex-recommended \
86+
texlive-xetex \
87+
texlive-fonts-extra-links \
88+
texlive-fonts-extra \
89+
xindy
90+
sudo chmod -R a+r /var/cache/apt/archives
91+
92+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
93+
with:
94+
python-version: '3.12'
95+
cache: 'pip'
96+
97+
- name: Install pip dependencies
98+
run: pip install -r requirements.txt
99+
100+
- name: Build html documentation
101+
run: cd ${{ matrix.manual.directory }} && make ${{ matrix.manual.make_target }}
71102

72103
- name: Compute PDF release version
73104
if: ${{ matrix.manual.build_pdf_path }}
@@ -85,6 +116,7 @@ jobs:
85116
env:
86117
DOCS_RELEASE: ${{ steps.pdf_version.outputs.release }}
87118
run: |
119+
set -e
88120
cd ${{ matrix.manual.directory }}
89121
make latexpdf
90122
ls -la ${{ matrix.manual.build_pdf_path }}

0 commit comments

Comments
 (0)