Skip to content

fix(ci): initialize trusted checkout before publishing fork previews - #181

Merged
vitormattos merged 1 commit into
mainfrom
fix/preview-fork-publishing-20261122
Nov 22, 2026
Merged

vitormattos merged 1 commit into
mainfrom
fix/preview-fork-publishing-20261122

Conversation

@vitormattos

Copy link
Copy Markdown
Member

Problem

Documentation Fork PR Preview Deploy fails during LibreSign/pr-preview-action when processing successful Dependabot builds. The deploy action's nested JamesIves/github-pages-deploy-action requires an initialized Git worktree, but the privileged workflow_run job only downloaded the HTML artifact.

Observed failures: PR #174 workflow and PR #175 workflow, both with fatal: not in a git directory / exit 128.

Fix

  • Checkout the trusted default branch, not the untrusted fork head, before downloading the validated artifact.
  • Disable persisted checkout credentials (persist-credentials: false). The existing repository-scoped GitHub App token remains the only deployment credential.
  • Preserve the existing artifact boundary checks, separate Pages destination, preview paths and removal workflow.

Verification

  • Confirmed the failing step and exact error in both previous CI logs.
  • Confirmed the underlying deployment action documents actions/checkout as mandatory.
  • Checked that the new checkout precedes artifact download and references github.event.repository.default_branch, without persisted credentials.
  • Commit is cryptographically verified and DCO signed off.

Remaining E2E verification: This PR itself uses the same-repository preview path; the workflow_run path must be validated with a subsequent real fork/Dependabot PR after integration. No merge is requested here.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1-4-g2a6da11

QR code for preview link

🚀 View preview at
https://libresign.github.io/site-preview/docs-preview/pr-181/

Built to branch gh-pages at 2026-11-22 15:16 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Documentation: All versions · LibreSign 16 development manual · Review notes

Preview is separate from production. LibreSign 16 has not been released; the development manual describes the upcoming version.

@vitormattos
vitormattos merged commit 38efdfe into main Nov 22, 2026
3 checks passed
@vitormattos
vitormattos deleted the fix/preview-fork-publishing-20261122 branch November 22, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant