Skip to content

Fix build: upgrade Starlight to 0.40.0, migrate breaking config changes, add CI workflow#37

Merged
SharonHart merged 2 commits into
mainfrom
copilot/fix-github-actions-build-job
Jun 29, 2026
Merged

Fix build: upgrade Starlight to 0.40.0, migrate breaking config changes, add CI workflow#37
SharonHart merged 2 commits into
mainfrom
copilot/fix-github-actions-build-job

Conversation

Copilot AI commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

astro@6.4.6 ships Zod v4 internally. Starlight 0.32.6's social schema uses z.record(z.enum(socialLinks), z.string().url()), which in Zod v4 requires all enum keys to be present — producing 43 "expected string, received undefined" errors at build time.

Changes

  • package.json — bump @astrojs/starlight ^0.32.0^0.40.0 (last version compatible with Astro v6.x; resolves the Zod v4 incompatibility)
  • astro.config.mjs — apply two breaking-change migrations required between 0.32 and 0.40:
    • social: object → array syntax (v0.33.0)
    • Sidebar autogenerate: must be nested inside items (v0.39.0)
  • pnpm-lock.yaml — regenerated
  • .github/workflows/ci.yml — new workflow that runs pnpm build on pull requests and non-main pushes, so build failures are caught before they reach the deploy workflow
// Before (Starlight ≤0.32)
social: { github: "https://github.com/data-privacy-stack" },
sidebar: [{ label: "Blog", autogenerate: { directory: "blog" } }]

// After (Starlight 0.40)
social: [{ icon: "github", label: "GitHub", href: "https://github.com/data-privacy-stack" }],
sidebar: [{ label: "Blog", items: [{ autogenerate: { directory: "blog" } }] }]

Copilot AI changed the title [WIP] Fix failing GitHub Actions job build Fix build: upgrade Starlight to 0.40.0, migrate breaking config changes, add CI workflow Jun 29, 2026
Copilot AI requested a review from SharonHart June 29, 2026 05:38
@SharonHart SharonHart marked this pull request as ready for review June 29, 2026 05:38
Comment thread .github/workflows/ci.yml
Comment on lines +10 to +25
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
# version is read from the "packageManager" field in package.json
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build with Astro
run: pnpm build
@SharonHart SharonHart merged commit 533e8b4 into main Jun 29, 2026
5 checks passed
@SharonHart SharonHart deleted the copilot/fix-github-actions-build-job branch June 29, 2026 05:39
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.

3 participants