docs(cli): DECO_TOKEN may be the site token for deco schema push

VI
11h ago
+6-3

What

Studio now accepts a site's own site token (the one passed to createCMS({ token })) on PUT /api/cms/:site/schema (decocms/studio#8424), so CI can run deco schema push without a personal Studio API key.

The CLI needs no code change: resolveToken takes DECO_TOKEN as is and pushSchema sends it as authorization: Bearer <token>. This PR only documents it:

  • deco --help: the schema push line says DECO_TOKEN may be the site token.
  • deco-site-workflow/references/schema.md: the token step and the CI example mention the site token, that it works for schema push only, and that a revoked one gets 401.

Verification

No test asserts the help text (grep -r 'draw forms' finds only run.ts); biome check on run.ts is clean.

Merge after decocms/studio#8424 is deployed; until then Studio answers a site token with 401.


Summary by cubic

Documents that deco schema push now accepts the site's own site token (the one passed to createCMS({ token }) via DECO_TOKEN, in addition to a Studio API key. Updates the CLI help text and the schema reference guide; no CLI code change needed since resolveToken already sends DECO_TOKEN as-is.

Merge note

  • Merge after decocms/studio#8424 is deployed; until then Studio returns 401 for site tokens.
  • The site token only works for schema push, and a revoked token gets 401.