feat(site): serve the V2 docs from services/site with SolidStart (#62229)

Co-authored-by: Dax Raad <d@ironbay.co>
This commit is contained in:
Adam
2026-11-05 23:17:30 -06:00
committed by GitHub
Unverified
parent f30b35f1f6
commit 9ced0469bb
175 changed files with 1844 additions and 1339 deletions
+42
View File
@@ -0,0 +1,42 @@
name: check-docs
# Builds the V2 docs on their own (services/site/src/docs/script/build.ts): compiles every MDX page,
# prerenders it, builds search, checks every link and that pages load nothing from outside /v2. The
# site's deploy runs the same step, so a broken page fails here instead of blocking the deploy.
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- services/site/**
- packages/protocol/openapi.json
- packages/cli/src/config/**
- .github/workflows/check-docs.yml
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
docs:
name: docs build
if: ${{ !github.event.pull_request.draft }}
runs-on: blacksmith-4vcpu-ubuntu-2404
timeout-minutes: 10
defaults:
run:
working-directory: services/site
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: ./.github/actions/setup-bun
# The API reference and the config schema the pages link (/v2/openapi.json, /v2/cli.json).
- name: Generate
run: bun run generate
- name: Build docs
run: bun src/docs/script/build.ts --mode dev --out "$RUNNER_TEMP/docs"
-37
View File
@@ -1,37 +0,0 @@
name: deploy-www
on:
push:
branches:
- dev
- production
workflow_dispatch:
concurrency:
group: deploy-www-${{ github.ref_name }}
cancel-in-progress: false
permissions:
contents: read
jobs:
deploy:
if: github.repository == 'anomalyco/opencode' && (github.ref_name == 'dev' || github.ref_name == 'production')
runs-on: blacksmith-4vcpu-ubuntu-2404
environment: ${{ github.ref_name }}
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- uses: ./.github/actions/setup-bun
- name: Build
working-directory: services/www
run: bun run build
env:
CLOUDFLARE_ENV: ${{ github.ref_name == 'production' && 'production' || 'dev' }}
- name: Deploy
working-directory: services/www
run: bun run deploy
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}