Skip to content

Commit ec23d82

Browse files
committed
perf(ci): optimize latex caching
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
1 parent 930ddd7 commit ec23d82

1 file changed

Lines changed: 15 additions & 4 deletions

File tree

.github/workflows/sphinxbuild.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
restore-keys: |
3535
latex-apt-${{ runner.os }}-${{ runner.arch }}-ubuntu-24.04-
3636
latex-apt-${{ runner.os }}-${{ runner.arch }}-
37+
lookup-only: true
3738

3839
- name: Download LaTeX packages (cache miss only)
3940
if: steps.cache-latex-apt.outputs.cache-hit != 'true'
@@ -47,6 +48,13 @@ jobs:
4748
# Ensure downloaded packages are owned by the current user so they can be cached
4849
sudo chown -R $(id -u):$(id -g) ${{ runner.temp }}/.cache/archives
4950
51+
- name: Save LaTeX apt cache (cache miss only)
52+
if: steps.cache-latex-apt.outputs.cache-hit != 'true'
53+
uses: actions/cache/save@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
54+
with:
55+
path: ${{ runner.temp }}/.cache/archives
56+
key: latex-apt-${{ runner.os }}-${{ runner.arch }}-ubuntu-24.04-texlive-2023
57+
5058
build:
5159
name: Build ${{ matrix.manual.name }}
5260
runs-on: ubuntu-latest
@@ -410,7 +418,7 @@ jobs:
410418
deploy:
411419
name: Deploy documentation for gh-pages
412420
needs: stage-and-check
413-
if: github.event_name == 'push'
421+
if: always()
414422
runs-on: ubuntu-latest
415423

416424
permissions:
@@ -495,14 +503,17 @@ jobs:
495503
if: steps.apply.outputs.has_changes == 'true'
496504
with:
497505
token: ${{ secrets.COMMAND_BOT_PAT }}
498-
commit-message: "chore: update documentation for ${{ needs.stage-and-check.outputs.branch_name }}"
506+
commit-message: "chore: update documentation for `${{ needs.stage-and-check.outputs.branch_name }}`"
499507
committer: nextcloud-command <nextcloud-command@users.noreply.github.com>
500508
author: nextcloud-command <nextcloud-command@users.noreply.github.com>
501509
signoff: true
502510
branch: "automated/deploy/documentation-${{ needs.stage-and-check.outputs.branch_name }}"
503511
base: gh-pages
504-
title: "Documentation update for ${{ needs.stage-and-check.outputs.branch_name }}"
505-
body: "Automated documentation update from branch ${{ github.ref_name }}"
512+
title: "Documentation update for `${{ needs.stage-and-check.outputs.branch_name }}`"
513+
body: |
514+
This PR was automatically generated by the CI workflow and
515+
includes the latest changes for the `${{ needs.stage-and-check.outputs.branch_name }}` branch.
516+
506517
delete-branch: true
507518
labels: "automated, 3. to review"
508519

0 commit comments

Comments
 (0)