From 11610133423c648c2d22bed0598c78d8583b358c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 17 Apr 2026 14:19:29 +0000 Subject: [PATCH 1/8] fix(ci): cache texlive-fonts-extra differently Signed-off-by: skjnldsv --- .github/workflows/sphinxbuild.yml | 217 +++++++++++++----------------- 1 file changed, 93 insertions(+), 124 deletions(-) diff --git a/.github/workflows/sphinxbuild.yml b/.github/workflows/sphinxbuild.yml index 13a837a93c6..2f74d8b9bdf 100644 --- a/.github/workflows/sphinxbuild.yml +++ b/.github/workflows/sphinxbuild.yml @@ -17,60 +17,48 @@ concurrency: jobs: setup-latex-cache: name: Cache LaTeX packages - runs-on: ubuntu-latest + # Force running on GitHub-hosted runners + runs-on: ubuntu-24.04 steps: - - name: Configure apt cache - run: | - mkdir -p ${{ runner.temp }}/.cache/archives - mkdir -p ${{ runner.temp }}/.cache/lists - echo 'Dir::Cache::archives "${{ runner.temp }}/.cache/archives";' | sudo tee /etc/apt/apt.conf.d/apt-cache-tmp - - - name: Cache LaTeX apt packages - id: cache-latex-apt + - name: Check texlive-fonts-extra installed files cache + id: cache-fonts-extra uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 with: - path: | - ${{ runner.temp }}/.cache/archives - ${{ runner.temp }}/.cache/lists - key: latex-apt-${{ runner.os }}-${{ runner.arch }}-ubuntu-24.04-texlive-2023-v2 - restore-keys: | - latex-apt-${{ runner.os }}-${{ runner.arch }}-ubuntu-24.04- - latex-apt-${{ runner.os }}-${{ runner.arch }}- + path: ${{ github.workspace }}/.cache/texlive-fonts-extra + key: latex-fonts-extra-${{ runner.os }}-${{ runner.arch }}-ubuntu-24.04-texlive-2023-v1 lookup-only: true - - name: Download LaTeX packages (cache miss only) - if: steps.cache-latex-apt.outputs.cache-hit != 'true' + - name: Install texlive-fonts-extra and cache installed files (cache miss only) + if: steps.cache-fonts-extra.outputs.cache-hit != 'true' run: | for i in 1 2 3; do sudo DEBIAN_FRONTEND=noninteractive apt-get update \ - -o Dir::State::lists="${{ runner.temp }}/.cache/lists" \ -o Acquire::Retries=3 && break echo "apt-get update failed (attempt $i), retrying in 15s..." sleep 15 done - sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - --download-only \ - -o Dir::State::lists="${{ runner.temp }}/.cache/lists" \ - python3-pil python3-pip texlive-fonts-recommended latexmk \ - texlive-latex-extra texlive-latex-recommended texlive-xetex \ - texlive-fonts-extra-links texlive-fonts-extra xindy tex-gyre - # Ensure downloaded packages are owned by the current user so they can be cached - sudo chown -R $(id -u):$(id -g) ${{ runner.temp }}/.cache/ - - - name: Save LaTeX apt cache (cache miss only) - if: steps.cache-latex-apt.outputs.cache-hit != 'true' + sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends texlive-fonts-extra + mkdir -p "$GITHUB_WORKSPACE/.cache/texlive-fonts-extra" + while IFS= read -r f; do + [ -f "$f" ] || [ -L "$f" ] || continue + rel="${f#/}" + dir="$GITHUB_WORKSPACE/.cache/texlive-fonts-extra/$(dirname "$rel")" + mkdir -p "$dir" + sudo cp -P "$f" "$dir/" + done < <(dpkg -L texlive-fonts-extra) + sudo chown -R $(id -u):$(id -g) "$GITHUB_WORKSPACE/.cache/texlive-fonts-extra" + + - name: Save texlive-fonts-extra installed files cache (cache miss only) + if: steps.cache-fonts-extra.outputs.cache-hit != 'true' uses: actions/cache/save@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 with: - path: | - ${{ runner.temp }}/.cache/archives - ${{ runner.temp }}/.cache/lists - key: latex-apt-${{ runner.os }}-${{ runner.arch }}-ubuntu-24.04-texlive-2023-v2 + path: ${{ github.workspace }}/.cache/texlive-fonts-extra + key: latex-fonts-extra-${{ runner.os }}-${{ runner.arch }}-ubuntu-24.04-texlive-2023-v1 - build: - name: Build ${{ matrix.manual.name }} + build-html: + name: Building ${{ matrix.manual.name }} HTML runs-on: ubuntu-latest - needs: setup-latex-cache strategy: fail-fast: false @@ -80,7 +68,6 @@ jobs: directory: "user_manual" make_target: "html" build_path: "_build/html" - build_pdf_path: "_build/latex" publish: true - name: "user_manual-en" @@ -99,19 +86,51 @@ jobs: directory: "admin_manual" make_target: "html" build_path: "_build/html/com" - build_pdf_path: "_build/latex" publish: true steps: - - name: Cache git metadata - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 + - name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + with: + python-version: "3.13" + cache: "pip" + + - name: Install pip dependencies + run: pip install -r requirements.txt + + - name: Build html documentation + run: cd ${{ matrix.manual.directory }} && make ${{ matrix.manual.make_target }} + + - name: Upload static documentation + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + if: ${{ matrix.manual.publish }} with: - path: .git - key: git-metadata-${{ github.sha }} - restore-keys: | - git-metadata-${{ github.sha }} - git-metadata + name: ${{ matrix.manual.name }} + path: ${{ matrix.manual.directory }}/${{ matrix.manual.build_path }} + + # ============================================================================ + # BUILD PDF + # ============================================================================ + build-pdf: + name: Building ${{ matrix.manual.name }} PDF + runs-on: [ubuntu-latest, self-hosted] + needs: setup-latex-cache + + strategy: + fail-fast: false + matrix: + manual: + - name: "user_manual" + directory: "user_manual" + build_pdf_path: "_build/latex" + + - name: "admin_manual" + directory: "admin_manual" + build_pdf_path: "_build/latex" + steps: - name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -123,44 +142,31 @@ jobs: - name: Install pip dependencies run: pip install -r requirements.txt - - name: Configure apt cache - if: ${{ matrix.manual.build_pdf_path }} - run: | - mkdir -p ${{ runner.temp }}/.cache/archives - mkdir -p ${{ runner.temp }}/.cache/lists - echo 'Dir::Cache::archives "${{ runner.temp }}/.cache/archives";' | sudo tee /etc/apt/apt.conf.d/apt-cache-tmp - - - name: Restore LaTeX apt cache - if: ${{ matrix.manual.build_pdf_path }} + - name: Restore texlive-fonts-extra installed files uses: actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 with: - # Use relative path https://github.com/actions/cache/issues/1127 - path: | - ${{ runner.temp }}/.cache/archives - ${{ runner.temp }}/.cache/lists - key: latex-apt-${{ runner.os }}-${{ runner.arch }}-ubuntu-24.04-texlive-2023-v2 - restore-keys: | - latex-apt-${{ runner.os }}-${{ runner.arch }}-ubuntu-24.04- - latex-apt-${{ runner.os }}-${{ runner.arch }}- - - - name: Install LaTeX from cache - if: ${{ matrix.manual.build_pdf_path }} - timeout-minutes: 5 - run: | - debs=(${{ runner.temp }}/.cache/archives/*.deb) - if [ ! -e "${debs[0]}" ]; then - echo "No .deb files found in cache archives — cache may be empty or missing." >&2 - exit 1 - fi - sudo dpkg -i --force-depends "${debs[@]}" - sudo DEBIAN_FRONTEND=noninteractive apt-get install -f -y --no-install-recommends \ - -o Dir::State::lists="${{ runner.temp }}/.cache/lists" + path: ${{ github.workspace }}/.cache/texlive-fonts-extra + key: latex-fonts-extra-${{ runner.os }}-${{ runner.arch }}-ubuntu-24.04-texlive-2023-v1 + fail-on-cache-miss: true - - name: Build html documentation - run: cd ${{ matrix.manual.directory }} && make ${{ matrix.manual.make_target }} + - name: Install texlive-fonts-extra from cache + run: sudo cp -r "$GITHUB_WORKSPACE/.cache/texlive-fonts-extra/." / + + - name: Install LaTeX packages + run: | + for i in 1 2 3; do + sudo DEBIAN_FRONTEND=noninteractive apt-get update \ + -o Acquire::Retries=3 && break + echo "apt-get update failed (attempt $i), retrying in 15s..." + sleep 15 + done + sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + texlive-fonts-recommended latexmk texlive-latex-extra \ + texlive-latex-recommended texlive-xetex texlive-fonts-extra-links \ + xindy tex-gyre + sudo mktexlsr - name: Compute PDF release version - if: ${{ matrix.manual.build_pdf_path }} id: pdf_version run: | branch="${GITHUB_REF#refs/heads/}" @@ -171,7 +177,6 @@ jobs: fi - name: Build pdf documentation - if: ${{ matrix.manual.build_pdf_path }} env: DOCS_RELEASE: ${{ steps.pdf_version.outputs.release }} run: | @@ -179,14 +184,12 @@ jobs: cd ${{ matrix.manual.directory }} make latexpdf ls -la ${{ matrix.manual.build_pdf_path }} - cp ${{ matrix.manual.build_pdf_path }}/*.pdf ${{ matrix.manual.build_path }}/ - - name: Upload static documentation + - name: Upload PDF documentation uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - if: ${{ matrix.manual.publish }} with: - name: ${{ matrix.manual.name }} - path: ${{ matrix.manual.directory }}/${{ matrix.manual.build_path }} + name: ${{ matrix.manual.name }}-pdf + path: ${{ matrix.manual.directory }}/${{ matrix.manual.build_pdf_path }}/*.pdf # ============================================================================ # STAGE AND VALIDATE @@ -203,7 +206,7 @@ jobs: # ============================================================================ stage-and-check: name: Stage and check documentation - needs: build + needs: [build-html, build-pdf] runs-on: ubuntu-latest outputs: @@ -223,15 +226,6 @@ jobs: additional_deployment: ${{ steps.branch.outputs.additional_deployment }} steps: - - name: Cache git metadata - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - with: - path: .git - key: git-metadata-${{ github.sha }} - restore-keys: | - git-metadata-${{ github.sha }} - git-metadata - - name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -249,22 +243,6 @@ jobs: # 2. Merge in the new artifacts (what we're about to deploy) # 3. Run link checks only on the NEW content, but with full context # ======================================================================== - # ======================================================================== - # FETCH GH-PAGES FOR LINK VALIDATION CONTEXT - # ======================================================================== - # We need the existing gh-pages content (old versions) so that link - # validation can resolve cross-version references. We use git cache - # to make this fast. - # ======================================================================== - - name: Cache git metadata for gh-pages - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - with: - path: .git - key: git-metadata-${{ github.sha }} - restore-keys: | - git-metadata-${{ github.sha }} - git-metadata - - name: Checkout gh-pages branch for validation context uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: @@ -402,15 +380,6 @@ jobs: pull-requests: write steps: - - name: Cache git metadata - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - with: - path: .git - key: git-metadata-${{ github.sha }} - restore-keys: | - git-metadata-${{ github.sha }} - git-metadata - - name: Checkout gh-pages branch uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: @@ -526,7 +495,7 @@ jobs: GH_TOKEN: ${{ secrets.COMMAND_BOT_PAT }} summary: - needs: [build, stage-and-check, deploy] + needs: [build-html, build-pdf, stage-and-check, deploy] runs-on: ubuntu-latest-low if: always() @@ -540,10 +509,10 @@ jobs: run: | if ${{ github.event_name == 'pull_request' }} then - echo "This workflow ran for a pull request. We need build and stage-and-check to succeed, but deploy will be skipped" - if ${{ needs.build.result != 'success' || needs.stage-and-check.result != 'success' || needs.deploy.result != 'skipped' }}; then exit 1; fi + echo "This workflow ran for a pull request. We need build-html and stage-and-check to succeed, but deploy will be skipped" + if ${{ needs.build-html.result != 'success' || needs.build-pdf.result != 'success' || needs.stage-and-check.result != 'success' || needs.deploy.result != 'skipped' }}; then exit 1; fi else echo "This workflow ran for a push. We need all jobs to succeed, including deploy" - if ${{ needs.build.result != 'success' || needs.stage-and-check.result != 'success' || needs.deploy.result != 'success' }}; then exit 1; fi + if ${{ needs.build-html.result != 'success' || needs.build-pdf.result != 'success' || needs.stage-and-check.result != 'success' || needs.deploy.result != 'success' }}; then exit 1; fi fi From 6f60a7ba08d055d4145b1ab43c7171f8df189ef1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 22 Apr 2026 07:51:15 +0000 Subject: [PATCH 2/8] feat: replace apt/cache LaTeX setup with pre-built Docker image on GHCR Agent-Logs-Url: https://github.com/nextcloud/documentation/sessions/8d8b500c-d7a6-4f87-9dd5-5b69e760a6ae Co-authored-by: skjnldsv <14975046+skjnldsv@users.noreply.github.com> --- .docker/sphinx-latex/Dockerfile | 23 ++++++++++ .github/dependabot.yml | 8 ++++ .github/workflows/docker-build.yml | 51 +++++++++++++++++++++ .github/workflows/sphinxbuild.yml | 72 +++--------------------------- 4 files changed, 87 insertions(+), 67 deletions(-) create mode 100644 .docker/sphinx-latex/Dockerfile create mode 100644 .github/workflows/docker-build.yml diff --git a/.docker/sphinx-latex/Dockerfile b/.docker/sphinx-latex/Dockerfile new file mode 100644 index 00000000000..8aef00c246e --- /dev/null +++ b/.docker/sphinx-latex/Dockerfile @@ -0,0 +1,23 @@ +FROM ubuntu:24.04 + +LABEL org.opencontainers.image.source="https://github.com/nextcloud/documentation" +LABEL org.opencontainers.image.description="Sphinx + LaTeX build environment for Nextcloud documentation" +LABEL org.opencontainers.image.licenses="AGPL-3.0" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + make \ + python3-pip \ + latexmk \ + tex-gyre \ + texlive-fonts-extra \ + texlive-fonts-extra-links \ + texlive-fonts-recommended \ + texlive-latex-extra \ + texlive-latex-recommended \ + texlive-xetex \ + xindy \ + && mktexlsr \ + && rm -rf /var/lib/apt/lists/* diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e620d47dbaa..a2a2ebe6ff5 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -17,3 +17,11 @@ updates: open-pull-requests-limit: 10 cooldown: default-days: 10 + - package-ecosystem: "docker" + directory: "/.docker/sphinx-latex" + schedule: + interval: "weekly" + time: "06:00" + open-pull-requests-limit: 10 + cooldown: + default-days: 10 diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml new file mode 100644 index 00000000000..8c89ddf1cde --- /dev/null +++ b/.github/workflows/docker-build.yml @@ -0,0 +1,51 @@ +name: Build and publish sphinx-latex Docker image + +on: + push: + branches: + - master + paths: + - ".docker/sphinx-latex/**" + workflow_dispatch: + +permissions: + contents: read + packages: write + +jobs: + build-and-push: + name: Build and push sphinx-latex image + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@b5730e84e09ef46c65d80d5f65f899e59003028b # v3.10.0 + + - name: Login to GitHub Container Registry + uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata for Docker + id: meta + uses: docker/metadata-action@902fa8ec7d6ecbea8a09e7f1f55b7a7b3b3ea4a8 # v5.7.0 + with: + images: ghcr.io/${{ github.repository }}/sphinx-latex + tags: | + type=raw,value=latest,enable={{is_default_branch}} + type=sha,prefix=sha- + + - name: Build and push Docker image + uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6.16.0 + with: + context: .docker/sphinx-latex + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=registry,ref=ghcr.io/${{ github.repository }}/sphinx-latex:latest + cache-to: type=inline diff --git a/.github/workflows/sphinxbuild.yml b/.github/workflows/sphinxbuild.yml index 2f74d8b9bdf..c89c7bf37a0 100644 --- a/.github/workflows/sphinxbuild.yml +++ b/.github/workflows/sphinxbuild.yml @@ -9,53 +9,13 @@ on: permissions: contents: read + packages: read concurrency: group: build-documentation-${{ github.head_ref || github.run_id }} cancel-in-progress: true jobs: - setup-latex-cache: - name: Cache LaTeX packages - # Force running on GitHub-hosted runners - runs-on: ubuntu-24.04 - - steps: - - name: Check texlive-fonts-extra installed files cache - id: cache-fonts-extra - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - with: - path: ${{ github.workspace }}/.cache/texlive-fonts-extra - key: latex-fonts-extra-${{ runner.os }}-${{ runner.arch }}-ubuntu-24.04-texlive-2023-v1 - lookup-only: true - - - name: Install texlive-fonts-extra and cache installed files (cache miss only) - if: steps.cache-fonts-extra.outputs.cache-hit != 'true' - run: | - for i in 1 2 3; do - sudo DEBIAN_FRONTEND=noninteractive apt-get update \ - -o Acquire::Retries=3 && break - echo "apt-get update failed (attempt $i), retrying in 15s..." - sleep 15 - done - sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends texlive-fonts-extra - mkdir -p "$GITHUB_WORKSPACE/.cache/texlive-fonts-extra" - while IFS= read -r f; do - [ -f "$f" ] || [ -L "$f" ] || continue - rel="${f#/}" - dir="$GITHUB_WORKSPACE/.cache/texlive-fonts-extra/$(dirname "$rel")" - mkdir -p "$dir" - sudo cp -P "$f" "$dir/" - done < <(dpkg -L texlive-fonts-extra) - sudo chown -R $(id -u):$(id -g) "$GITHUB_WORKSPACE/.cache/texlive-fonts-extra" - - - name: Save texlive-fonts-extra installed files cache (cache miss only) - if: steps.cache-fonts-extra.outputs.cache-hit != 'true' - uses: actions/cache/save@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - with: - path: ${{ github.workspace }}/.cache/texlive-fonts-extra - key: latex-fonts-extra-${{ runner.os }}-${{ runner.arch }}-ubuntu-24.04-texlive-2023-v1 - build-html: name: Building ${{ matrix.manual.name }} HTML runs-on: ubuntu-latest @@ -115,8 +75,9 @@ jobs: # ============================================================================ build-pdf: name: Building ${{ matrix.manual.name }} PDF - runs-on: [ubuntu-latest, self-hosted] - needs: setup-latex-cache + runs-on: ubuntu-latest + container: + image: ghcr.io/${{ github.repository }}/sphinx-latex:latest strategy: fail-fast: false @@ -142,30 +103,6 @@ jobs: - name: Install pip dependencies run: pip install -r requirements.txt - - name: Restore texlive-fonts-extra installed files - uses: actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - with: - path: ${{ github.workspace }}/.cache/texlive-fonts-extra - key: latex-fonts-extra-${{ runner.os }}-${{ runner.arch }}-ubuntu-24.04-texlive-2023-v1 - fail-on-cache-miss: true - - - name: Install texlive-fonts-extra from cache - run: sudo cp -r "$GITHUB_WORKSPACE/.cache/texlive-fonts-extra/." / - - - name: Install LaTeX packages - run: | - for i in 1 2 3; do - sudo DEBIAN_FRONTEND=noninteractive apt-get update \ - -o Acquire::Retries=3 && break - echo "apt-get update failed (attempt $i), retrying in 15s..." - sleep 15 - done - sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - texlive-fonts-recommended latexmk texlive-latex-extra \ - texlive-latex-recommended texlive-xetex texlive-fonts-extra-links \ - xindy tex-gyre - sudo mktexlsr - - name: Compute PDF release version id: pdf_version run: | @@ -191,6 +128,7 @@ jobs: name: ${{ matrix.manual.name }}-pdf path: ${{ matrix.manual.directory }}/${{ matrix.manual.build_pdf_path }}/*.pdf + # ============================================================================ # STAGE AND VALIDATE # ============================================================================ From 8dab90954271c28e4937016ae808328aab4fa1a9 Mon Sep 17 00:00:00 2001 From: Hamza Date: Tue, 21 Apr 2026 12:08:58 +0200 Subject: [PATCH 3/8] docs(admin): document encryption:clean-orphaned-keys occ command AI-assisted: Claude (claude-sonnet-4-6) Signed-off-by: Hamza Co-authored-by: skjnldsv <14975046+skjnldsv@users.noreply.github.com> --- admin_manual/occ_files.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/admin_manual/occ_files.rst b/admin_manual/occ_files.rst index a30f22b19cf..bfcb9a6aadd 100644 --- a/admin_manual/occ_files.rst +++ b/admin_manual/occ_files.rst @@ -11,6 +11,8 @@ Encryption encryption encryption:change-key-storage-root Change key storage root + encryption:clean-orphaned-keys Scan the keys storage for orphaned + keys and remove them encryption:decrypt-all Disable server-side encryption and decrypt all files encryption:disable Disable encryption @@ -84,6 +86,16 @@ will be migrated to drop their legacy filekey on the first modification. If you old files from Nextcloud<25 still using base64 encoding this will migrate them to the binary format and save about 33% disk space. +``encryption:clean-orphaned-keys`` scans the key storage for keys that no longer +have a corresponding file and removes them. When run, it iterates over all user +key stores, reports any orphaned keys found, and then interactively asks whether +to delete all of them at once or specific ones individually:: + + sudo -E -u www-data php occ encryption:clean-orphaned-keys [] + +The optional ``user`` argument limits the scan to a single user. If omitted, all +users are scanned. + See :doc:`../configuration_files/encryption_configuration` to learn more. .. _federation_sync_label: From 31e535d600768969ee39a69c10feda6cd7631741 Mon Sep 17 00:00:00 2001 From: Koen de Jonge Date: Tue, 7 Apr 2026 10:26:11 +0200 Subject: [PATCH 4/8] Update system_requirements.rst typo in debian release name Signed-off-by: Koen de Jonge Co-authored-by: skjnldsv <14975046+skjnldsv@users.noreply.github.com> --- admin_manual/installation/system_requirements.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin_manual/installation/system_requirements.rst b/admin_manual/installation/system_requirements.rst index 0f3ceb9433b..cff52ad8fe1 100644 --- a/admin_manual/installation/system_requirements.rst +++ b/admin_manual/installation/system_requirements.rst @@ -18,7 +18,7 @@ For best performance, stability and functionality we have documented some recomm | (64-bit) | - Ubuntu 22.04 LTS | | | - **Red Hat Enterprise Linux 10** (recommended) | | | - Red Hat Enterprise Linux 9 | -| | - Debian 13 (Trixi) | +| | - Debian 13 (Trixie) | | | - Debian 12 (Bookworm) | | | - SUSE Linux Enterprise Server 16 | | | - SUSE Linux Enterprise Server 15 SP6 (or later) | From 89f6bfda00af1839ead943102a08acb2e80a02b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6?= Date: Wed, 22 Apr 2026 09:44:07 +0200 Subject: [PATCH 5/8] fix: remove extra whitespace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Anna Signed-off-by: John Molakvoæ Co-authored-by: skjnldsv <14975046+skjnldsv@users.noreply.github.com> --- admin_manual/installation/system_requirements.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin_manual/installation/system_requirements.rst b/admin_manual/installation/system_requirements.rst index cff52ad8fe1..f226b53beb3 100644 --- a/admin_manual/installation/system_requirements.rst +++ b/admin_manual/installation/system_requirements.rst @@ -18,7 +18,7 @@ For best performance, stability and functionality we have documented some recomm | (64-bit) | - Ubuntu 22.04 LTS | | | - **Red Hat Enterprise Linux 10** (recommended) | | | - Red Hat Enterprise Linux 9 | -| | - Debian 13 (Trixie) | +| | - Debian 13 (Trixie) | | | - Debian 12 (Bookworm) | | | - SUSE Linux Enterprise Server 16 | | | - SUSE Linux Enterprise Server 15 SP6 (or later) | From 107d9db196201d6c2a61d016518dd25023d437cd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 22 Apr 2026 08:04:32 +0000 Subject: [PATCH 6/8] revert: restore sphinxbuild.yml to master state (docker-only PR) Agent-Logs-Url: https://github.com/nextcloud/documentation/sessions/da008f3d-67e4-4663-830c-a069fd516978 Co-authored-by: skjnldsv <14975046+skjnldsv@users.noreply.github.com> --- .github/workflows/sphinxbuild.yml | 195 ++++++++++++++++++++++-------- 1 file changed, 144 insertions(+), 51 deletions(-) diff --git a/.github/workflows/sphinxbuild.yml b/.github/workflows/sphinxbuild.yml index c89c7bf37a0..13a837a93c6 100644 --- a/.github/workflows/sphinxbuild.yml +++ b/.github/workflows/sphinxbuild.yml @@ -9,17 +9,69 @@ on: permissions: contents: read - packages: read concurrency: group: build-documentation-${{ github.head_ref || github.run_id }} cancel-in-progress: true jobs: - build-html: - name: Building ${{ matrix.manual.name }} HTML + setup-latex-cache: + name: Cache LaTeX packages runs-on: ubuntu-latest + steps: + - name: Configure apt cache + run: | + mkdir -p ${{ runner.temp }}/.cache/archives + mkdir -p ${{ runner.temp }}/.cache/lists + echo 'Dir::Cache::archives "${{ runner.temp }}/.cache/archives";' | sudo tee /etc/apt/apt.conf.d/apt-cache-tmp + + - name: Cache LaTeX apt packages + id: cache-latex-apt + uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 + with: + path: | + ${{ runner.temp }}/.cache/archives + ${{ runner.temp }}/.cache/lists + key: latex-apt-${{ runner.os }}-${{ runner.arch }}-ubuntu-24.04-texlive-2023-v2 + restore-keys: | + latex-apt-${{ runner.os }}-${{ runner.arch }}-ubuntu-24.04- + latex-apt-${{ runner.os }}-${{ runner.arch }}- + lookup-only: true + + - name: Download LaTeX packages (cache miss only) + if: steps.cache-latex-apt.outputs.cache-hit != 'true' + run: | + for i in 1 2 3; do + sudo DEBIAN_FRONTEND=noninteractive apt-get update \ + -o Dir::State::lists="${{ runner.temp }}/.cache/lists" \ + -o Acquire::Retries=3 && break + echo "apt-get update failed (attempt $i), retrying in 15s..." + sleep 15 + done + sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + --download-only \ + -o Dir::State::lists="${{ runner.temp }}/.cache/lists" \ + python3-pil python3-pip texlive-fonts-recommended latexmk \ + texlive-latex-extra texlive-latex-recommended texlive-xetex \ + texlive-fonts-extra-links texlive-fonts-extra xindy tex-gyre + # Ensure downloaded packages are owned by the current user so they can be cached + sudo chown -R $(id -u):$(id -g) ${{ runner.temp }}/.cache/ + + - name: Save LaTeX apt cache (cache miss only) + if: steps.cache-latex-apt.outputs.cache-hit != 'true' + uses: actions/cache/save@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 + with: + path: | + ${{ runner.temp }}/.cache/archives + ${{ runner.temp }}/.cache/lists + key: latex-apt-${{ runner.os }}-${{ runner.arch }}-ubuntu-24.04-texlive-2023-v2 + + build: + name: Build ${{ matrix.manual.name }} + runs-on: ubuntu-latest + needs: setup-latex-cache + strategy: fail-fast: false matrix: @@ -28,6 +80,7 @@ jobs: directory: "user_manual" make_target: "html" build_path: "_build/html" + build_pdf_path: "_build/latex" publish: true - name: "user_manual-en" @@ -46,9 +99,19 @@ jobs: directory: "admin_manual" make_target: "html" build_path: "_build/html/com" + build_pdf_path: "_build/latex" publish: true steps: + - name: Cache git metadata + uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 + with: + path: .git + key: git-metadata-${{ github.sha }} + restore-keys: | + git-metadata-${{ github.sha }} + git-metadata + - name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -60,50 +123,44 @@ jobs: - name: Install pip dependencies run: pip install -r requirements.txt - - name: Build html documentation - run: cd ${{ matrix.manual.directory }} && make ${{ matrix.manual.make_target }} - - - name: Upload static documentation - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - if: ${{ matrix.manual.publish }} - with: - name: ${{ matrix.manual.name }} - path: ${{ matrix.manual.directory }}/${{ matrix.manual.build_path }} - - # ============================================================================ - # BUILD PDF - # ============================================================================ - build-pdf: - name: Building ${{ matrix.manual.name }} PDF - runs-on: ubuntu-latest - container: - image: ghcr.io/${{ github.repository }}/sphinx-latex:latest - - strategy: - fail-fast: false - matrix: - manual: - - name: "user_manual" - directory: "user_manual" - build_pdf_path: "_build/latex" - - - name: "admin_manual" - directory: "admin_manual" - build_pdf_path: "_build/latex" - - steps: - - name: Checkout repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - name: Configure apt cache + if: ${{ matrix.manual.build_pdf_path }} + run: | + mkdir -p ${{ runner.temp }}/.cache/archives + mkdir -p ${{ runner.temp }}/.cache/lists + echo 'Dir::Cache::archives "${{ runner.temp }}/.cache/archives";' | sudo tee /etc/apt/apt.conf.d/apt-cache-tmp - - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + - name: Restore LaTeX apt cache + if: ${{ matrix.manual.build_pdf_path }} + uses: actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 with: - python-version: "3.13" - cache: "pip" + # Use relative path https://github.com/actions/cache/issues/1127 + path: | + ${{ runner.temp }}/.cache/archives + ${{ runner.temp }}/.cache/lists + key: latex-apt-${{ runner.os }}-${{ runner.arch }}-ubuntu-24.04-texlive-2023-v2 + restore-keys: | + latex-apt-${{ runner.os }}-${{ runner.arch }}-ubuntu-24.04- + latex-apt-${{ runner.os }}-${{ runner.arch }}- + + - name: Install LaTeX from cache + if: ${{ matrix.manual.build_pdf_path }} + timeout-minutes: 5 + run: | + debs=(${{ runner.temp }}/.cache/archives/*.deb) + if [ ! -e "${debs[0]}" ]; then + echo "No .deb files found in cache archives — cache may be empty or missing." >&2 + exit 1 + fi + sudo dpkg -i --force-depends "${debs[@]}" + sudo DEBIAN_FRONTEND=noninteractive apt-get install -f -y --no-install-recommends \ + -o Dir::State::lists="${{ runner.temp }}/.cache/lists" - - name: Install pip dependencies - run: pip install -r requirements.txt + - name: Build html documentation + run: cd ${{ matrix.manual.directory }} && make ${{ matrix.manual.make_target }} - name: Compute PDF release version + if: ${{ matrix.manual.build_pdf_path }} id: pdf_version run: | branch="${GITHUB_REF#refs/heads/}" @@ -114,6 +171,7 @@ jobs: fi - name: Build pdf documentation + if: ${{ matrix.manual.build_pdf_path }} env: DOCS_RELEASE: ${{ steps.pdf_version.outputs.release }} run: | @@ -121,13 +179,14 @@ jobs: cd ${{ matrix.manual.directory }} make latexpdf ls -la ${{ matrix.manual.build_pdf_path }} + cp ${{ matrix.manual.build_pdf_path }}/*.pdf ${{ matrix.manual.build_path }}/ - - name: Upload PDF documentation + - name: Upload static documentation uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + if: ${{ matrix.manual.publish }} with: - name: ${{ matrix.manual.name }}-pdf - path: ${{ matrix.manual.directory }}/${{ matrix.manual.build_pdf_path }}/*.pdf - + name: ${{ matrix.manual.name }} + path: ${{ matrix.manual.directory }}/${{ matrix.manual.build_path }} # ============================================================================ # STAGE AND VALIDATE @@ -144,7 +203,7 @@ jobs: # ============================================================================ stage-and-check: name: Stage and check documentation - needs: [build-html, build-pdf] + needs: build runs-on: ubuntu-latest outputs: @@ -164,6 +223,15 @@ jobs: additional_deployment: ${{ steps.branch.outputs.additional_deployment }} steps: + - name: Cache git metadata + uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 + with: + path: .git + key: git-metadata-${{ github.sha }} + restore-keys: | + git-metadata-${{ github.sha }} + git-metadata + - name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -181,6 +249,22 @@ jobs: # 2. Merge in the new artifacts (what we're about to deploy) # 3. Run link checks only on the NEW content, but with full context # ======================================================================== + # ======================================================================== + # FETCH GH-PAGES FOR LINK VALIDATION CONTEXT + # ======================================================================== + # We need the existing gh-pages content (old versions) so that link + # validation can resolve cross-version references. We use git cache + # to make this fast. + # ======================================================================== + - name: Cache git metadata for gh-pages + uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 + with: + path: .git + key: git-metadata-${{ github.sha }} + restore-keys: | + git-metadata-${{ github.sha }} + git-metadata + - name: Checkout gh-pages branch for validation context uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: @@ -318,6 +402,15 @@ jobs: pull-requests: write steps: + - name: Cache git metadata + uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 + with: + path: .git + key: git-metadata-${{ github.sha }} + restore-keys: | + git-metadata-${{ github.sha }} + git-metadata + - name: Checkout gh-pages branch uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: @@ -433,7 +526,7 @@ jobs: GH_TOKEN: ${{ secrets.COMMAND_BOT_PAT }} summary: - needs: [build-html, build-pdf, stage-and-check, deploy] + needs: [build, stage-and-check, deploy] runs-on: ubuntu-latest-low if: always() @@ -447,10 +540,10 @@ jobs: run: | if ${{ github.event_name == 'pull_request' }} then - echo "This workflow ran for a pull request. We need build-html and stage-and-check to succeed, but deploy will be skipped" - if ${{ needs.build-html.result != 'success' || needs.build-pdf.result != 'success' || needs.stage-and-check.result != 'success' || needs.deploy.result != 'skipped' }}; then exit 1; fi + echo "This workflow ran for a pull request. We need build and stage-and-check to succeed, but deploy will be skipped" + if ${{ needs.build.result != 'success' || needs.stage-and-check.result != 'success' || needs.deploy.result != 'skipped' }}; then exit 1; fi else echo "This workflow ran for a push. We need all jobs to succeed, including deploy" - if ${{ needs.build-html.result != 'success' || needs.build-pdf.result != 'success' || needs.stage-and-check.result != 'success' || needs.deploy.result != 'success' }}; then exit 1; fi + if ${{ needs.build.result != 'success' || needs.stage-and-check.result != 'success' || needs.deploy.result != 'success' }}; then exit 1; fi fi From e043df1d1c0ecbb88cc0029cd5efde40977fbbdf Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 22 Apr 2026 08:14:35 +0000 Subject: [PATCH 7/8] ci: build docker image on PRs without publishing Agent-Logs-Url: https://github.com/nextcloud/documentation/sessions/8e53503f-10f0-497f-8194-72fb2ea086e1 Co-authored-by: skjnldsv <14975046+skjnldsv@users.noreply.github.com> --- .github/workflows/docker-build.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 8c89ddf1cde..b228f1b633e 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -6,6 +6,9 @@ on: - master paths: - ".docker/sphinx-latex/**" + pull_request: + paths: + - ".docker/sphinx-latex/**" workflow_dispatch: permissions: @@ -25,6 +28,7 @@ jobs: uses: docker/setup-buildx-action@b5730e84e09ef46c65d80d5f65f899e59003028b # v3.10.0 - name: Login to GitHub Container Registry + if: github.event_name != 'pull_request' uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0 with: registry: ghcr.io @@ -44,7 +48,7 @@ jobs: uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6.16.0 with: context: .docker/sphinx-latex - push: true + push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=registry,ref=ghcr.io/${{ github.repository }}/sphinx-latex:latest From 823dbf768e24a58c5a3ed662933621c91f00ced5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 22 Apr 2026 08:19:21 +0000 Subject: [PATCH 8/8] ci: fix invalid SHA pins for docker/metadata-action and docker/setup-buildx-action Agent-Logs-Url: https://github.com/nextcloud/documentation/sessions/5932d893-4bf0-4bb9-9e1d-cf69e3a9e2ba Co-authored-by: skjnldsv <14975046+skjnldsv@users.noreply.github.com> --- .github/workflows/docker-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index b228f1b633e..af3439ba6e5 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -25,7 +25,7 @@ jobs: uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@b5730e84e09ef46c65d80d5f65f899e59003028b # v3.10.0 + uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0 - name: Login to GitHub Container Registry if: github.event_name != 'pull_request' @@ -37,7 +37,7 @@ jobs: - name: Extract metadata for Docker id: meta - uses: docker/metadata-action@902fa8ec7d6ecbea8a09e7f1f55b7a7b3b3ea4a8 # v5.7.0 + uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0 with: images: ghcr.io/${{ github.repository }}/sphinx-latex tags: |