Skip to content

Commit 24008ab

Browse files
authored
feat(site): deploy the opencode.ai site separately from the docs (#62209)
1 parent 84262f9 commit 24008ab

1,538 files changed

Lines changed: 686 additions & 969 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.gitattributes‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ packages/core/src/**/*.txt text eol=lf
1111
packages/httpapi-codegen/test/generated/*.ts text eol=lf
1212
# The site tests compare source text and humans.txt byte for byte, so Windows checkouts keep LF.
1313
services/www/** text=auto eol=lf
14+
services/site/** text=auto eol=lf
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: deploy-meta
1+
name: deploy-site
22

33
on:
44
push:
@@ -8,7 +8,7 @@ on:
88
workflow_dispatch:
99

1010
concurrency:
11-
group: deploy-meta-${{ github.ref_name }}
11+
group: deploy-site-${{ github.ref_name }}
1212
cancel-in-progress: false
1313

1414
permissions:
@@ -24,17 +24,16 @@ jobs:
2424

2525
- uses: ./.github/actions/setup-bun
2626

27-
- name: Typecheck
28-
working-directory: services/meta
29-
run: bun run typecheck:tsc
30-
27+
# The workflow's own token, at build time only: script/github-snapshot.ts records the repo
28+
# numbers and releases the site falls back to. The Worker never gets a GitHub token.
3129
- name: Build
32-
working-directory: services/meta
33-
run: bun run build --mode ${{ github.ref_name == 'production' && 'production' || 'dev' }}
30+
working-directory: services/site
31+
run: bun script/build.ts --mode ${{ github.ref_name }}
32+
env:
33+
GITHUB_TOKEN: ${{ github.token }}
3434

3535
- name: Deploy
36-
working-directory: services/meta
37-
run: bun run deploy --mode ${{ github.ref_name == 'production' && 'production' || 'dev' }}
36+
working-directory: services/site
37+
run: bunx cf deploy --prebuilt --mode ${{ github.ref_name }}
3838
env:
39-
CLOUDFLARE_ACCOUNT_ID: 15d29c8639fd3733b1b5486a2acfd968
4039
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}

‎.github/workflows/deploy-www.yml‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,14 @@ jobs:
2424

2525
- uses: ./.github/actions/setup-bun
2626

27-
# The workflow's own token, at build time only: script/github-snapshot.ts records the repo
28-
# numbers and releases the site falls back to. The Worker never gets a GitHub token.
2927
- name: Build
3028
working-directory: services/www
31-
run: bun script/build.ts --mode ${{ github.ref_name }}
29+
run: bun run build
3230
env:
33-
GITHUB_TOKEN: ${{ github.token }}
31+
CLOUDFLARE_ENV: ${{ github.ref_name == 'production' && 'production' || 'dev' }}
3432

3533
- name: Deploy
3634
working-directory: services/www
37-
run: bunx cf deploy --prebuilt --mode ${{ github.ref_name }}
35+
run: bun run deploy
3836
env:
3937
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}

‎.opencode/agent/translator.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ If no locale-specific glossary exists, use the global glossary only.
2424

2525
# Website Copy (opencode.ai)
2626

27-
When translating the marketing site (`services/www/site/src/i18n/<locale>.ts` and `src/i18n/content/<locale>.ts`):
27+
When translating the marketing site (`services/site/src/i18n/<locale>.ts` and `src/i18n/content/<locale>.ts`):
2828

2929
- Keep every `{{param}}`, every link id in `[text](id)` (translate the text, keep the id) and every `` `code` `` span exactly.
3030
- Keep these names as written: OpenCode, OpenCode Models, OpenCode Go, OpenCode Go Plus, Claude Opus 5.5, Anomaly, Console, and every company, model and app name.

‎.oxlintrc.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@
194194
".roo/**",
195195
".windsurf/**",
196196
"script/oxlint/anti-slop/**",
197-
"services/www/site/public/arcade3d/basis/**",
198-
"services/www/site/public/arcade3d/draco/**"
197+
"services/site/public/arcade3d/basis/**",
198+
"services/site/public/arcade3d/draco/**"
199199
]
200200
}

‎bun.lock‎

Lines changed: 211 additions & 426 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"dev:web": "bun --cwd packages/app dev",
1616
"dev:console": "ulimit -n 10240 2>/dev/null; bun run --cwd packages/console/app dev",
1717
"dev:stats": "bun sst shell --stage=production -- bun run --cwd packages/stats/app dev",
18+
"dev:site": "bun run --cwd services/site dev",
1819
"dev:www": "bun run --cwd services/www dev",
1920
"lint": "oxlint && ast-grep scan -c script/ast-grep/gui-plugins/sgconfig.yml && bun script/sdk-docs.ts",
2021
"lint:changed": "bun script/lint-changed.ts",

‎packages/web/astro.config.mjs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,8 @@ function configSchema() {
340340
hooks: {
341341
"astro:build:done": async () => {
342342
execFileSync("bun", ["../schema/script/config-schema.ts", "./dist/client/config.json"], { stdio: "inherit" })
343-
// The V1 TUI schema is frozen in services/meta since packages/opencode lives on the v1 branch.
344-
copyFileSync("../../services/meta/public/tui.json", "./dist/client/tui.json")
343+
// The V1 TUI schema is frozen in services/site since packages/opencode lives on the v1 branch.
344+
copyFileSync("../../services/site/public/tui.json", "./dist/client/tui.json")
345345
},
346346
},
347347
}

‎services/README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ and clients live in `packages/`.
55

66
| Service | Purpose | Deployment |
77
| -------------------------- | -------------------------------------- | -------------------------------- |
8-
| [`www`](./www) | Website and V2 documentation | `deploy-www.yml`, `cf` |
8+
| [`site`](./site) | The opencode.ai website | `deploy-site.yml`, `cf` |
9+
| [`www`](./www) | V2 documentation at `/v2` | `deploy-www.yml`, Wrangler |
910
| [`updates`](./updates) | Release metadata and update selection | `release.yml`, Wrangler |
1011
| [`files`](./files) | Public file distribution at `/files/*` | `deploy-files.yml`, Wrangler |
1112
| [`changelog`](./changelog) | Release notes at `/changelog` | `deploy-changelog.yml`, Wrangler |
12-
| [`meta`](./meta) | Config schemas and well-known files | `deploy-meta.yml`, `cf` |
1313

1414
These directories are Bun workspaces. Run package commands from each service's
1515
directory. Repository-wide Turbo commands discover them through `services/*`.

‎services/meta/.gitignore‎

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)