Skip to content

EXP-1609: Migrate deployment to GitHub Pages - #1862

Merged
pmckinney-codat merged 4 commits into
mainfrom
exp-1609/github-pages-migration
Jul 27, 2026
Merged

EXP-1609: Migrate deployment to GitHub Pages#1862
pmckinney-codat merged 4 commits into
mainfrom
exp-1609/github-pages-migration

Conversation

@pmckinney-codat

@pmckinney-codat pmckinney-codat commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

What

Migrates docs.codat.io deployment from Vercel to GitHub Pages (EXP-1609, part of the Vercel migration workstream). Follows the pattern proven on legal.codat.io (codatio/legal#74) and the engineering blog.

  • .github/workflows/deploy.yml — on push to main: Node 24, npm ci (ADO feed via NPM_TOKEN), docusaurus build, publish to GitHub Pages. No fetch-depth: 0 needed — this site doesn't use showLastUpdateAuthor/Time.
  • .github/workflows/pr.yml — build-only PR check. This replaces Vercel preview deployments (tradeoff acked by the docs team).
  • static/CNAMEdocs.codat.io for the custom domain.
  • Removed @docusaurus/plugin-vercel-analytics (plugin + dependency). Lockfile was edited by hand (leaf dependency; @vercel/oidc stays — it belongs to @ai-sdk/gateway); the npm ci in this PR's own check validates it.

Deliberately NOT in this PR

  • vercel.json stays — Vercel keeps auto-deploying prod from main until decommission, and it carries the live CORS headers on /updates/rss.xml. It gets deleted in a cleanup PR after cutover.
  • The vercel.json redirect (/docs/angular/your-first-app/2-taking-photos) was not ported to plugin-client-redirects: neither source nor target exists anywhere in the repo — it's an Ionic-template leftover.
  • DNS cutover is a separate infrastructure-as-code PR.

Before merging

  • Repo secrets set (27 Jul): NPM_TOKEN, ZENDESK_KEY, AMPLITUDE_API_KEY, GTM_ID, FEATURE_DEV_FLAG, FEATURE_NEW_PRODUCTS_FLAG (all captured from Vercel; GA_ID also copied over but unused by the code)
  • Workflows read all env vars from secrets
  • Org setting members_can_create_public_pages enabled (needed at site-creation time)
  • Repo Settings → Pages → Source: GitHub Actions
  • /updates/rss.xml CORS consumer: resolved — the only consumer is portal-ui's "What's New" fetch (app.codat.io), a plain axios.get with no custom headers since Datadog RUM was removed from portal-ui in Sep 2025 (PEP-141). No preflight is sent; GitHub Pages' default access-control-allow-origin: * suffices. The x-datadog allow-headers in vercel.json are dead config.

After merge, the site at codatio.github.io/codat-docs will look broken with a "wrong baseUrl" banner — expected, it's built for docs.codat.io. Then set the custom domain in Pages settings.

🤖 Generated with Claude Code

- deploy.yml: build on main + publish to GitHub Pages (Node 24, npm ci
  with NPM_TOKEN against the ADO feed, build env vars via repo
  secrets/variables)
- pr.yml: build-only PR check (replaces Vercel preview deployments)
- static/CNAME for docs.codat.io
- Remove @docusaurus/plugin-vercel-analytics plugin + dependency
  (lockfile edited by hand; npm ci in CI validates it)
- vercel.json intentionally untouched: Vercel still serves prod from
  main until decommission, and it carries the live CORS headers

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
codat-docs Ready Ready Preview, Comment Jul 27, 2026 12:24pm

Request Review

@pmckinney-codat
pmckinney-codat marked this pull request as ready for review July 27, 2026 12:11
…ets, not variables)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
pmckinney-codat and others added 2 commits July 27, 2026 13:16
The Sign-in click is already tracked via Amplitude; the Vercel track()
call was the only remaining usage and broke the build (and the Vercel
preview) once the dependency was removed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
GTM_ID and the feature flags are public values; vars keep them visible
in the UI and unmasked in logs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Link check results for preview deployment (https://codat-docs-git-exp-1609-github-pages-migration-codat.vercel.app):

[]

@pmckinney-codat
pmckinney-codat merged commit cd54ecf into main Jul 27, 2026
6 of 7 checks passed
@pmckinney-codat
pmckinney-codat deleted the exp-1609/github-pages-migration branch July 27, 2026 12:43
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.

2 participants