Skip to content

Commit 1007d43

Browse files
Copilotskjnldsv
andcommitted
fix: fix cache path, HTML job dependency, and job names
- HTML builds no longer wait for setup-latex-cache since they don't need LaTeX - PDF builds still depend on setup-latex-cache - Job names are now "Building <manual> HTML" and "Building <manual> PDF" - Cache path changed from ~/.cache/texlive-fonts-extra to ${{ github.workspace }}/.cache/texlive-fonts-extra so the tar archive stores a workspace-relative path that resolves to the same location on both GitHub-hosted and self-hosted runners (the old ~ path was encoded as ../../../.cache/... relative to the workspace root, which resolved to different absolute paths depending on the runner's directory depth) Agent-Logs-Url: https://github.com/nextcloud/documentation/sessions/80b5c006-0eb9-4931-950f-5dec3be72077 Co-authored-by: skjnldsv <14975046+skjnldsv@users.noreply.github.com>
1 parent e71a0c3 commit 1007d43

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

.github/workflows/sphinxbuild.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
id: cache-fonts-extra
2626
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
2727
with:
28-
path: ~/.cache/texlive-fonts-extra
28+
path: ${{ github.workspace }}/.cache/texlive-fonts-extra
2929
key: latex-fonts-extra-${{ runner.os }}-${{ runner.arch }}-ubuntu-24.04-texlive-2023-v1
3030
lookup-only: true
3131

@@ -39,27 +39,26 @@ jobs:
3939
sleep 15
4040
done
4141
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends texlive-fonts-extra
42-
mkdir -p ~/.cache/texlive-fonts-extra
42+
mkdir -p "$GITHUB_WORKSPACE/.cache/texlive-fonts-extra"
4343
while IFS= read -r f; do
4444
[ -f "$f" ] || [ -L "$f" ] || continue
4545
rel="${f#/}"
46-
dir="$HOME/.cache/texlive-fonts-extra/$(dirname "$rel")"
46+
dir="$GITHUB_WORKSPACE/.cache/texlive-fonts-extra/$(dirname "$rel")"
4747
mkdir -p "$dir"
4848
sudo cp -P "$f" "$dir/"
4949
done < <(dpkg -L texlive-fonts-extra)
50-
sudo chown -R $(id -u):$(id -g) ~/.cache/texlive-fonts-extra
50+
sudo chown -R $(id -u):$(id -g) "$GITHUB_WORKSPACE/.cache/texlive-fonts-extra"
5151
5252
- name: Save texlive-fonts-extra installed files cache (cache miss only)
5353
if: steps.cache-fonts-extra.outputs.cache-hit != 'true'
5454
uses: actions/cache/save@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
5555
with:
56-
path: ~/.cache/texlive-fonts-extra
56+
path: ${{ github.workspace }}/.cache/texlive-fonts-extra
5757
key: latex-fonts-extra-${{ runner.os }}-${{ runner.arch }}-ubuntu-24.04-texlive-2023-v1
5858

5959
build-html:
60-
name: Build ${{ matrix.manual.name }}
60+
name: Building ${{ matrix.manual.name }} HTML
6161
runs-on: ubuntu-latest
62-
needs: setup-latex-cache
6362

6463
strategy:
6564
fail-fast: false
@@ -115,7 +114,7 @@ jobs:
115114
# BUILD PDF
116115
# ============================================================================
117116
build-pdf:
118-
name: Build PDF ${{ matrix.manual.name }}
117+
name: Building ${{ matrix.manual.name }} PDF
119118
runs-on: [ubuntu-latest, self-hosted]
120119
needs: setup-latex-cache
121120

@@ -146,12 +145,12 @@ jobs:
146145
- name: Restore texlive-fonts-extra installed files
147146
uses: actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
148147
with:
149-
path: ~/.cache/texlive-fonts-extra
148+
path: ${{ github.workspace }}/.cache/texlive-fonts-extra
150149
key: latex-fonts-extra-${{ runner.os }}-${{ runner.arch }}-ubuntu-24.04-texlive-2023-v1
151150
fail-on-cache-miss: true
152151

153152
- name: Install texlive-fonts-extra from cache
154-
run: sudo cp -r ~/.cache/texlive-fonts-extra/. /
153+
run: sudo cp -r "$GITHUB_WORKSPACE/.cache/texlive-fonts-extra/." /
155154

156155
- name: Install LaTeX packages
157156
run: |

0 commit comments

Comments
 (0)