Skip to content

extractPreviewConfig

extractPreviewConfig(raw, ctx?): PreviewConfig | null

Defined in: cli/astromech/src/generators/github-action-thin-callers/github-action-thin-callers.ts:231

Extract the Cloudflare Pages preview config from a deploy workflow’s with: object.

Accepts three forms:

  • preview: true — derive both project and domain from org context
  • preview: { project: "..." } — explicit project; domain derived from context if omitted
  • preview: { project: "...", domain: "..." } — fully explicit

Returns null when preview: is absent, false, or can’t be resolved.

Record<string, unknown>

OrgContext = {}

PreviewConfig | null