Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/baseline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,19 @@ jobs:
# ✕ action orun.pr/land@v1 has no parameter "repo"
# ✕ input "domain" has unknown type "bool"
#
# — with every gate green, because none of them asked orun. This job pins the
# bootstrap FLOOR (BOOTSTRAP.md: v2.60, where the run-level
# `hooks.preInstantiate` list arrives) and makes orun place the whole tree,
# — with every gate green, because none of them asked orun. This job pins
# v2.96.0: at or above the bootstrap FLOOR (BOOTSTRAP.md: v2.60, where the
# run-level `hooks.preInstantiate` list arrives), and the first orun that
# reads a component's `spec.preview`, so the placement's `orun validate`
# checks the site's live preview too. It makes orun place the whole tree,
# hooks off: offline, no credential, about ten seconds.
blueprint-runs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: sourceplane/orun-action@v1.2.0
with:
version: v2.76.0
version: v2.96.0
- uses: actions/setup-node@v5
with:
node-version: 22
Expand Down
21 changes: 21 additions & 0 deletions apps/web-site/component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,27 @@ spec:
- profile: deploy
when:
triggerRef: github-push-main
# How the site runs itself for orun.work's live Preview tab
# (saas-parallel-baselining PB4): `orun preview` starts this, and a coding
# session keeps it running while it works, so the person watches it change
# as it is built. The dev server binds the box's loopback only, on a fixed
# port, and installs first, so a checkout the session has not installed yet
# still comes up.
# It installs only this app's packages and runs the site alone, with its
# heap capped: the box is shared with the agent. site-api and mail-worker do
# not run; the islands that call site-api from the browser (views, upvotes,
# the subscribe and contact forms) degrade to their static messages, as they
# do whenever it is unreachable.
preview:
run:
- sh
- -c
- pnpm install --frozen-lockfile --prefer-offline --filter "@site/web-site..." && exec node_modules/.bin/next dev -H 127.0.0.1 -p 3000
port: 3000
path: /
env:
NODE_OPTIONS: --max-old-space-size=1024
NEXT_TELEMETRY_DISABLED: "1"
parameters:
nodeVersion: "22"
pnpmVersion: "10.12.1"
Expand Down
10 changes: 10 additions & 0 deletions apps/web-site/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ const nextConfig = {
outputFileTracingRoot: path.join(__dirname, "../.."),
typescript: { ignoreBuildErrors: false },
eslint: { ignoreDuringBuilds: true },
experimental: {
// Dev server only: behind orun.work's live Preview the browser's Origin
// is the preview's host while `next dev` sees a local Host, and Next.js
// refuses a Server Action from an origin it is not told about. `next
// build` runs with NODE_ENV=production, so production keeps its
// same-origin check.
...(process.env.NODE_ENV === "development"
? { serverActions: { allowedOrigins: ["*.orun-preview.app", "preview-gateway-stage.oruncloud.workers.dev"] } }
: {}),
},
env: {
NEXT_PUBLIC_DEPLOY_ENV: process.env.NEXT_PUBLIC_DEPLOY_ENV ?? "",
NEXT_PUBLIC_SITE_API_URL: process.env.NEXT_PUBLIC_SITE_API_URL ?? "",
Expand Down
7 changes: 7 additions & 0 deletions intent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ compositions:
cloudflare-domain: stack-tectonic
db-migrate: stack-tectonic

# The live preview (saas-parallel-baselining PB4): the component orun.work's
# Preview tab shows while a coding session works on the site. Its own
# `spec.preview` (apps/web-site/component.yaml) says how it runs; `orun preview`
# runs it.
preview:
component: web-site

discovery:
roots:
- apps/
Expand Down
Loading