Skip to content

ci(website): version the site through changesets, deploy to Cloudflare Workers - #828

Merged
cameri merged 6 commits into
mainfrom
feat/website-deploy
Oct 15, 2026
Merged

cameri merged 6 commits into
mainfrom
feat/website-deploy

Conversation

@chappie-daemon

Copy link
Copy Markdown
Collaborator

Summary

The marketing site from #823 becomes a first-class release unit, and deploys itself.

Versioning. website/site joins the pnpm workspace as nostream-website (root pnpm-workspace.yaml; the site's standalone lockfile folds into the root one). A changeset with "nostream-website": <patch|minor|major> now bumps the site through the existing Changesets Release flow — same release PR, same version commit, no new machinery.

Deploy. New Deploy Website workflow:

  • triggers on a push to main touching the site, the lockfile, or any repo file the build reads at build time (README, docs, deploy runbooks, CHANGELOG, package.json), plus workflow_dispatch
  • builds the site with SITE_URL from the website-production environment, then wrangler deploy
  • CLOUDFLARE_API_TOKEN (Workers Scripts scope) and CLOUDFLARE_ACCOUNT_ID live in the website-production GitHub environment
  • website/site/wrangler.jsonc binds dist/ as a Workers static-assets site: html_handling: auto-trailing-slash, SPA fallback for unknown paths. Everything is prerendered — docs and changelog render from the repository at build time, so no SSR, no adapter, no server code
  • ema.tnsor.network rides on a Workers Custom Domain, added to the worker at first deploy (DNS + certificate managed by Cloudflare)

Media. Today's hero.mp4 is 1.5 MB — comfortably inside the Static Assets 25 MiB per-file cap, so it ships with the site. If a future asset crosses ~20 MB, the same account's R2 (zero egress) is the planned home; assets config accepts additional bindings without rework.

Verification

  • changeset version bumps nostream-website only — the relay keeps its own version (verified locally with a changeset, then reverted)
  • site builds from the merged lockfile: 14 pages, all /docs/* routes emitted as static files
  • wrangler deploy --dry-run reads the 96 built files; worker bundle 0.37 KiB

website/site joins the pnpm workspace as nostream-website, so the
marketing site is versioned by the same changesets flow as the relay.
Its standalone lockfile folds into the root one.

Verified: changeset version bumps nostream-website only (nostream stays
at its own version), site builds from the merged lockfile.
wrangler.jsonc binds the built dist/ as a Workers static-assets site
(html_handling auto-trailing-slash, SPA fallback for unknown paths — the
site has no 404 page and no server code; everything is prerendered).
wrangler joins website/site as a devDependency.

Deploy Website runs after a release PR merges to main (paths cover the
site, its lockfile and every repo file the build reads at build time:
README, docs, deploy runbooks, CHANGELOG, package.json), plus
workflow_dispatch. It builds with SITE_URL from the website-production
environment and runs wrangler deploy with CLOUDFLARE_API_TOKEN from that
environment. ema.tnsor.network rides on a Workers Custom Domain — set it
on the worker at first deploy.

Dry-run verified: wrangler reads the 96 built files, 0.37 KiB worker.
@changeset-bot

changeset-bot Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b0b8111

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
nostream-website Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@socket-security

socket-security Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedwrangler@​4.151.0981009296100

View full report

@greptile-apps

greptile-apps Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[High impact] The changes appear safe to merge; no new actionable issue was found.

Summary

Adds the website to the pnpm workspace and Changesets release flow, then builds and deploys its static files to Cloudflare Workers.

  • The website gets its own version in the shared release flow.
  • The site builds and deploys to Cloudflare Workers from main.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Website changeset] --> B[Changesets release PR]
  B --> C[Merge to main]
  C --> D[Build static website]
  D --> E[Deploy to Cloudflare Workers]
  F[Manual run on main] --> D
  G[Published release] --> H{Tag starts with v?}
  H -->|Yes| I[Build relay image]
  H -->|No| J[Skip relay image]
Loading

Reviews (3) · Last reviewed commit: "ci: apply Greptile review fixes to the w..." · Reviewed by Greptile

Comment thread .github/workflows/deploy-website.yml
Comment thread pnpm-workspace.yaml
The workspace merge made knip scan website/site, where it cannot trace
Astro's build-time imports (astro, sharp, the CSS-imported @fontsource
packages) or wrangler (invoked by CI, not imported), so all five read as
unused dependencies and check:deps failed. Each gets an explicit
ignoreDependencies row in the website/site workspace block, scoped to
that workspace only.
Cameri provisioned the environment under the name 'website' with
CLOUDFLARE_API_TOKEN (secret) and CLOUDFLARE_ACCOUNT_ID (var), so the
job references that environment directly. SITE_URL is pinned to
https://ema.tnsor.network — the site is built for one production domain,
no need for a configurable var.
Comment thread .github/workflows/deploy-website.yml
Comment thread pnpm-workspace.yaml
@coveralls

coveralls commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 38784227627

Coverage remained the same at 74.494%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 10504
Covered Lines: 8205
Line Coverage: 78.11%
Relevant Branches: 5457
Covered Branches: 3685
Branch Coverage: 67.53%
Branches in Coverage %: Yes
Coverage Strength: 854.19 hits per line

💛 - Coveralls

- workflow_dispatch on deploy-website.yml ignores the push-branch filter;
  the job now refuses to run off main
- website releases (nostream-website@ tags) no longer build the relay
  container image: release.yml gates on the relay's vX.Y.Z tag shape
- pnpm.onlyBuiltDependencies moves from website/site/package.json to
  pnpm-workspace.yaml, where pnpm 10 reads it; esbuild postinstalls run
  again instead of being silently skipped
#818 removed src/utils/negentropy.ts from the root ignore list (its
content moved into src/utils/negentropy-sessions.ts). Keeping that row
would mask knip coverage, so the root ignore list takes main's; the
workspaces block (website/site) is ours.
@cameri
cameri merged commit bb28deb into main Oct 15, 2026
16 checks passed
@cameri
cameri deleted the feat/website-deploy branch October 15, 2026 19:09
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