Skip to content

feat(eng-docs): SEA-1765 deploy.ts on GitHub Actions + eng-docs-deploy.yml - #243

Open
seal-agent wants to merge 3 commits into
mainfrom
compass-eng-docs-t3-deploy
Open

feat(eng-docs): SEA-1765 deploy.ts on GitHub Actions + eng-docs-deploy.yml#243
seal-agent wants to merge 3 commits into
mainfrom
compass-eng-docs-t3-deploy

Conversation

@seal-agent

@seal-agent seal-agent commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

This PR is part of a stack containing 2 PRs:

  1. main
  2. feat(eng-docs): SEA-1764 port gather.ts to the compass taxonomy #242
  3. "feat(eng-docs): SEA-1765 deploy.ts on GitHub Actions + eng-docs-deploy.yml" (this PR)

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

@linear-code

linear-code Bot commented Aug 9, 2026

Copy link
Copy Markdown

SEA-1765

Base automatically changed from compass-eng-docs-t2-gather to main August 9, 2026 21:59
seal-agent and others added 3 commits August 9, 2026 17:59
…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
mattwilkinsonn force-pushed the compass-eng-docs-t3-deploy branch from 26bfeaf to 8730007 Compare August 9, 2026 21:59
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