feat(eng-docs): SEA-1765 deploy.ts on GitHub Actions + eng-docs-deploy.yml - #243
Open
seal-agent wants to merge 3 commits into
Open
feat(eng-docs): SEA-1765 deploy.ts on GitHub Actions + eng-docs-deploy.yml#243seal-agent wants to merge 3 commits into
seal-agent wants to merge 3 commits into
Conversation
…y.yml Port the sealed docsite deploy to the compass eng-docs app, adapting the CI plane from Woodpecker to GitHub Actions. deploy.ts keeps the pure construction/execution split verbatim (wrangler argv, changed-page mapping, comment body, escape/encode helpers) and swaps the Woodpecker CI_* env for the GITHUB_*/PR_* set. The recorded commit SHA is PR_HEAD_SHA (github.event.pull_request.head.sha) on a PR and GITHUB_SHA on push — never GITHUB_SHA on a PR, which is the ephemeral refs/pull/N/merge commit rather than the branch head. Adds the standalone eng-docs-deploy.yml CD workflow (not part of moon ci :ci) with a same-repo fork guard on the deploy job, reusing ci.yml's .prototools pin-reading shape. Refs SEA-1765 Co-authored-by: Matt Wilkinson <matt@sealedsecurity.com>
…ds dist/ The `eng-docs-deploy.yml` Deploy step invoked `bun apps/eng-docs/scripts/deploy.ts` from the repo root, but `wranglerArgs` deploys the project-relative `dist` path (`wrangler pages deploy dist`) and the build writes to `apps/eng-docs/dist` (moon `build.outputs: ['dist']`, run in the project dir). From the repo-root cwd `dist` resolved to `<repo-root>/dist`, which never exists, so every production and preview deploy failed. Restore the frozen record's §T3 shape: `working-directory: apps/eng-docs` + `run: bun scripts/deploy.ts`, so the workflow's cwd matches the moon-task cwd and `dist` resolves to `apps/eng-docs/dist` where the build emits it. deploy.ts's only cwd-relative operation is the wrangler `dist` arg; `repoRoot` for the changed-pages lookup is derived from `import.meta.url` (cwd-independent), so nothing else shifts. Spec-impact: none. Refs SEA-1765 Co-authored-by: Matt Wilkinson <matt@sealedsecurity.com>
…main
The `eng-docs-deploy.yml` build step (`moon run compass-eng-docs:build`) aborts on a PR with `git ... main` exit 128 ("ambiguous argument 'main': unknown revision"). `actions/checkout` defaults to a shallow, single-ref checkout, but moon's affected-graph diffing resolves its base against `main` (`.moon/workspace.yml` `defaultBranch: main`) and needs that ref present. Without it the build dies before the deploy step ever runs.
Set `fetch-depth: 0` on the checkout, matching `ci.yml:130-135` (which carries the same full-history requirement for its `buf breaking` base). Full history populates `refs/remotes/origin/*`, so moon resolves the base and the build proceeds.
Spec-impact: none. Refs SEA-1765
Co-authored-by: Matt Wilkinson <matt@sealedsecurity.com>
mattwilkinsonn
force-pushed
the
compass-eng-docs-t3-deploy
branch
from
August 9, 2026 21:59
26bfeaf to
8730007
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is part of a stack containing 2 PRs:
mainPort the sealed docsite deploy to the compass eng-docs app, adapting the CI plane from Woodpecker to GitHub Actions. deploy.ts keeps the pure construction/execution split verbatim (wrangler argv, changed-page mapping, comment body, escape/encode helpers) and swaps the Woodpecker CI_* env for the GITHUB_/PR_ set. The recorded commit SHA is PR_HEAD_SHA (github.event.pull_request.head.sha) on a PR and GITHUB_SHA on push — never GITHUB_SHA on a PR, which is the ephemeral refs/pull/N/merge commit rather than the branch head. Adds the standalone eng-docs-deploy.yml CD workflow (not part of moon ci :ci) with a same-repo fork guard on the deploy job, reusing ci.yml's .prototools pin-reading shape.
Refs SEA-1765
Co-authored-by: Matt Wilkinson matt@sealedsecurity.com