From 6e1c29bf6ce4607614c4e29b57b3971bcf00ca3b Mon Sep 17 00:00:00 2001 From: PerfectPan Date: Tue, 5 May 2026 22:32:53 +0800 Subject: [PATCH 1/2] chore: update site domain and vercel checks Generated with Codex Co-Authored-By: Codex --- .github/workflows/ci.yml | 20 ++++++++++++++++++-- CHANGELOG.md | 6 ++++++ Cargo.toml | 1 + README.md | 9 +++++++-- site/README.md | 11 +++++++++++ site/src/routes/__root.tsx | 34 +++++++++++++++++++++++++++++++--- site/src/routes/index.tsx | 25 ++++++++++++++++++++++--- site/src/styles.css | 34 +++++++++++++++++++++++++++++++++- 8 files changed, 129 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8403a17..4808778 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,8 +6,8 @@ on: pull_request: jobs: - test: - name: test + rust: + name: rust runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -18,3 +18,19 @@ jobs: - run: cargo clippy --all-targets -- -D warnings - run: cargo test - run: cargo package --allow-dirty + + site: + name: site + runs-on: ubuntu-latest + defaults: + run: + working-directory: site + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: npm + cache-dependency-path: site/package-lock.json + - run: npm ci + - run: npm run build diff --git a/CHANGELOG.md b/CHANGELOG.md index 62e107a..73cae06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Unreleased + +- Updated landing page and crate metadata for `https://ocvm.vercel.app`. +- Clarified the site Install section around the pinned `v0.1.1` release. +- Added a GitHub Actions site build gate for the Vercel app in `site/`. + ## 0.1.0 - Initial Rust CLI project for `ocvm`. diff --git a/Cargo.toml b/Cargo.toml index 49d7019..b45efd3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,6 +5,7 @@ edition = "2021" description = "OpenClaw Version Manager" license = "MIT" repository = "https://github.com/PerfectPan/ocvm" +homepage = "https://ocvm.vercel.app" readme = "README.md" keywords = ["openclaw", "version-manager", "cli"] categories = ["command-line-utilities", "development-tools"] diff --git a/README.md b/README.md index 912a52a..cfbbb67 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This is a version manager, not an OpenClaw installer replacement. Installation is the mechanism; reproducible local OpenClaw environments are the product. -Website: https://site-neon-two.vercel.app +Website: https://ocvm.vercel.app ## Status @@ -214,13 +214,18 @@ Run real npm OpenClaw install validation in Docker instead of on the host: ## Landing Page -The TanStack Start landing page is deployed at https://site-neon-two.vercel.app. Source lives in `site/` and is configured for Vercel deployments from that directory: +The TanStack Start landing page is deployed at https://ocvm.vercel.app. Source lives in `site/` and is configured for Vercel deployments from that directory: ```bash npm ci --prefix site npm run build --prefix site ``` +For automatic Vercel deployments from GitHub, connect the Vercel project to +`PerfectPan/ocvm`, set the project Root Directory to `site`, and track `main` +as the production branch. Pull requests receive preview deployments; merges to +`main` publish production deployments for `ocvm.vercel.app`. + ## Development ```bash diff --git a/site/README.md b/site/README.md index d407aba..18a6963 100644 --- a/site/README.md +++ b/site/README.md @@ -2,6 +2,8 @@ TanStack Start landing page for the OpenClaw Version Manager. +Production URL: https://ocvm.vercel.app + ## Development ```bash @@ -31,3 +33,12 @@ docker run --rm -u "$(id -u):$(id -g)" \ Deploy the `site/` directory with Vercel. The site-specific `vercel.json` uses `npm ci` and `npm run build`. + +For GitHub-backed automatic deployments: + +- Import or connect `PerfectPan/ocvm` in Vercel. +- Set the Vercel project Root Directory to `site`. +- Use `main` as the production branch. +- Assign `ocvm.vercel.app` to the project production domain. +- Keep the GitHub `CI` workflow's `site` job required so proposed changes + exercise the same site build command before merge. diff --git a/site/src/routes/__root.tsx b/site/src/routes/__root.tsx index d653dbc..518609c 100644 --- a/site/src/routes/__root.tsx +++ b/site/src/routes/__root.tsx @@ -3,6 +3,11 @@ import type { ReactNode } from 'react' import appCss from '../styles.css?url' +const siteUrl = 'https://ocvm.vercel.app/' +const siteTitle = 'ocvm - OpenClaw Version Manager' +const siteDescription = + 'ocvm installs, pins, switches, snapshots, and verifies OpenClaw versions for reproducible local projects.' + export const Route = createRootRoute({ head: () => ({ meta: [ @@ -14,12 +19,31 @@ export const Route = createRootRoute({ content: 'width=device-width, initial-scale=1', }, { - title: 'ocvm - OpenClaw Version Manager', + title: siteTitle, }, { name: 'description', - content: - 'ocvm installs, pins, switches, snapshots, and verifies OpenClaw versions for reproducible local projects.', + content: siteDescription, + }, + { + property: 'og:title', + content: siteTitle, + }, + { + property: 'og:description', + content: siteDescription, + }, + { + property: 'og:url', + content: siteUrl, + }, + { + property: 'og:type', + content: 'website', + }, + { + name: 'twitter:card', + content: 'summary', }, ], links: [ @@ -27,6 +51,10 @@ export const Route = createRootRoute({ rel: 'stylesheet', href: appCss, }, + { + rel: 'canonical', + href: siteUrl, + }, { rel: 'icon', href: '/ocvm-mark.svg', diff --git a/site/src/routes/index.tsx b/site/src/routes/index.tsx index afd6a68..ba10073 100644 --- a/site/src/routes/index.tsx +++ b/site/src/routes/index.tsx @@ -2,6 +2,10 @@ import { createFileRoute } from '@tanstack/react-router' export const Route = createFileRoute('/')({ component: Home }) +const currentRelease = 'v0.1.1' +const installCommand = `curl -fsSL \\ + https://raw.githubusercontent.com/PerfectPan/ocvm/${currentRelease}/install.sh | sh` + const features = [ { title: 'Project pinning', @@ -88,12 +92,27 @@ OpenClaw 2026.3.28`}
-
+

Install

-

Install a pinned release with one command.

+

Install the current pinned release.

+

+ The installer downloads the {currentRelease} GitHub Release asset + for your platform, verifies the checksum when one is available, and + installs ocvm into your local bin directory. +

+
-          curl -fsSL https://raw.githubusercontent.com/PerfectPan/ocvm/v0.1.1/install.sh | sh
+          {installCommand}
         
diff --git a/site/src/styles.css b/site/src/styles.css index 8003876..c042e98 100644 --- a/site/src/styles.css +++ b/site/src/styles.css @@ -176,6 +176,33 @@ h1 { color: #fffdf7; } +.installText p:not(.sectionLabel) { + max-width: 560px; + margin: 18px 0 0; + color: #dfe8d9; + font-size: 1.05rem; + line-height: 1.62; +} + +.installText code { + color: #fffdf7; + font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; + font-size: 0.95em; +} + +.installActions { + display: flex; + flex-wrap: wrap; + gap: 18px; + margin-top: 24px; + color: #d8f5cc; + font-weight: 750; +} + +.installActions a { + border-bottom: 1px solid currentColor; +} + h2 { margin-bottom: 0; font-size: 3.3rem; @@ -192,6 +219,11 @@ h2 { line-height: 1.55; } +.installCommand code { + white-space: pre-wrap; + overflow-wrap: anywhere; +} + .features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); @@ -297,7 +329,7 @@ h2 { .terminal pre, .installCommand { padding: 18px; - font-size: 0.72rem; + font-size: 0.78rem; } h1 { From 6071471600f31373e4ede3c9ef41a94d3e85e9da Mon Sep 17 00:00:00 2001 From: PerfectPan Date: Tue, 5 May 2026 22:37:23 +0800 Subject: [PATCH 2/2] ci: configure vercel root build Generated with Codex Co-Authored-By: Codex --- .gitignore | 1 + CHANGELOG.md | 1 + README.md | 8 +++++--- site/README.md | 6 +++++- vercel.json | 5 +++++ 5 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 vercel.json diff --git a/.gitignore b/.gitignore index 94429ad..56f312f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /target/ +/.vercel/ /.ocvm/ /.openclaw-version .omx/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 73cae06..828f898 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Updated landing page and crate metadata for `https://ocvm.vercel.app`. - Clarified the site Install section around the pinned `v0.1.1` release. - Added a GitHub Actions site build gate for the Vercel app in `site/`. +- Added repository-root Vercel build configuration for GitHub deployments. ## 0.1.0 diff --git a/README.md b/README.md index cfbbb67..5ef65c6 100644 --- a/README.md +++ b/README.md @@ -222,9 +222,11 @@ npm run build --prefix site ``` For automatic Vercel deployments from GitHub, connect the Vercel project to -`PerfectPan/ocvm`, set the project Root Directory to `site`, and track `main` -as the production branch. Pull requests receive preview deployments; merges to -`main` publish production deployments for `ocvm.vercel.app`. +`PerfectPan/ocvm` and track `main` as the production branch. The root +`vercel.json` installs and builds the `site/` app, then places Nitro's Vercel +output where Vercel expects it for a repository-root project. Pull requests +receive preview deployments; merges to `main` publish production deployments +for `ocvm.vercel.app`. ## Development diff --git a/site/README.md b/site/README.md index 18a6963..dc5cc5f 100644 --- a/site/README.md +++ b/site/README.md @@ -37,8 +37,12 @@ Deploy the `site/` directory with Vercel. The site-specific `vercel.json` uses For GitHub-backed automatic deployments: - Import or connect `PerfectPan/ocvm` in Vercel. -- Set the Vercel project Root Directory to `site`. - Use `main` as the production branch. - Assign `ocvm.vercel.app` to the project production domain. +- Keep the repository-root `vercel.json` when the Vercel project is connected + at the repository root. It runs the site install/build commands and copies + `site/.vercel/output` to the root `.vercel/output` expected by Vercel. +- If the Vercel project Root Directory is changed to `site`, the site-local + `vercel.json` is enough and the root build wrapper is not used. - Keep the GitHub `CI` workflow's `site` job required so proposed changes exercise the same site build command before merge. diff --git a/vercel.json b/vercel.json new file mode 100644 index 0000000..5d5a6f8 --- /dev/null +++ b/vercel.json @@ -0,0 +1,5 @@ +{ + "framework": null, + "installCommand": "cd site && npm ci", + "buildCommand": "cd site && npm run build && rm -rf ../.vercel && cp -R .vercel ../.vercel" +}