Repository navigation
docs(cli): DECO_TOKEN may be the site token for deco schema push - #807
Open
viktormarinho wants to merge 1 commit into
Open
viktormarinho wants to merge 1 commit into
viktormarinho wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Studio now accepts a site's own site token (the one passed to
createCMS({ token })) onPUT /api/cms/:site/schema(decocms/studio#8424), so CI can rundeco schema pushwithout a personal Studio API key.The CLI needs no code change:
resolveTokentakesDECO_TOKENas is andpushSchemasends it asauthorization: Bearer <token>. This PR only documents it:deco --help: theschema pushline 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 forschema pushonly, and that a revoked one gets 401.Verification
No test asserts the help text (
grep -r 'draw forms'finds onlyrun.ts);biome checkonrun.tsis clean.Merge after decocms/studio#8424 is deployed; until then Studio answers a site token with 401.
Summary by cubic
Documents that
deco schema pushnow accepts the site's own site token (the one passed tocreateCMS({ token })viaDECO_TOKEN, in addition to a Studio API key. Updates the CLI help text and the schema reference guide; no CLI code change needed sinceresolveTokenalready sendsDECO_TOKENas-is.Merge note
schema push, and a revoked token gets 401.Written for commit f068e3c. Summary will update on new commits.