Add deploy script, eval refresh script and Go-priced eval data
Deploy to Cloudflare Pages / deploy (push) Failing after 25s

- scripts/deploy.sh: manual Cloudflare Pages deploy (same steps as CI)
- scripts/refresh-evals.mjs: re-scrape Artificial Analysis + OpenCode Data into evals.js
- evals.js now carries OpenCode Go list prices; Hy4 and LongCat 2.5 left empty
  rather than borrowing a neighbouring model's numbers
- workflow creates the Pages project idempotently
This commit is contained in:
2026-10-21 15:27:11 +00:00
parent 9943adab09
commit 46447d422b
6 changed files with 266 additions and 36 deletions
+18 -10
View File
@@ -49,13 +49,21 @@ Add these as repository secrets (Gitea: *Settings → Actions → Secrets*):
| `CLOUDFLARE_API_TOKEN` | Cloudflare API token with **Cloudflare Pages: Edit** (and Account Settings: Read) |
| `CLOUDFLARE_ACCOUNT_ID` | The Cloudflare account that owns the Pages project |
The workflow in `.gitea/workflows/pages.yml` then deploys `site/` on every push to `main`.
The workflow in `.gitea/workflows/pages.yml` then:
1. checks out the repo and installs Wrangler,
2. stages `MODELS.md` next to the site,
3. creates the Pages project if it does not exist yet (idempotent),
4. deploys `site/` on every push to `main`, on a manual *Run workflow*, and hourly.
A runner must be registered on the Gitea instance for the workflow to execute.
### 3. Deploy manually (optional)
```bash
npm run deploy # wrangler pages deploy site --project-name opencodogoevals
npm run dev # local preview on http://localhost:8788
./scripts/deploy.sh # uses env vars or your wrangler login session
npm run deploy # same thing, wrangler only
npm run dev # local preview on http://localhost:8788
```
### Custom domain
@@ -70,13 +78,13 @@ Cloudflare-compatible local server.
## Updating the data
1. Benchmark scores come from each model's Artificial Analysis page
(`https://artificialanalysis.ai/models/<slug>`) — the embedded JSON payload in the page
contains the full evaluation set per model.
2. Catalog facts (pricing, context window, modalities, release date) come from
`https://opencode.ai/data/<lab>/<model>.json` and the Go docs.
3. Edit `site/assets/evals.js` and `site/assets/data.js`, then regenerate `MODELS.md`
from `data.js` and re-commit.
1. `node scripts/refresh-evals.mjs` re-scrapes every model's benchmark scores from
Artificial Analysis and rewrites `site/assets/evals.js`. Model names, OpenCode Go
prices and free-tier flags come from `site/assets/data.js` (hand-maintained from the
Go docs), so the chart always shows Go pricing.
2. Descriptions, modalities, release dates and caveats live in `site/assets/data.js`;
update them there and regenerate `MODELS.md`.
3. Commit both files — CI publishes the site on push.
## Caveats