{"schemaVersion":"toolkit.solution-page.v1","publisher":{"name":"Toolkit","url":"https://toolkit.fun"},"slug":"website-deployment","category":"websites","status":"beta","locale":"en","documentUrl":"https://toolkit.fun/en/solutions/websites/website-deployment.json","title":"Website generation and deployment","summary":"Build, preview, verify, and publish a static website to a Toolkit hosted URL.","pageUrl":"https://toolkit.fun/en/solutions/websites/website-deployment","requestUrl":null,"tool":{"slug":"website.deploy","status":"available","manifestUrl":null,"manifest":{"id":"toolkit.website-deployment","version":"0.1.0","apiVersion":"toolkit.plugin.v1","resources":["website","website.version"],"tools":["website.create","website.build","website.deploy","website.preview","website.qa","website.publish","website.rollback","website.status"],"workflows":["website.deploy"],"artifacts":["website.static-build","website.preview-url","website.live-url","website.qa-report"],"providers":["filesystem","cloudflare-r2"]}},"workflow":{"slug":"website.deploy","status":"available","pageUrl":"https://toolkit.fun/en/solutions/websites/website-deployment"},"delivery":{"status":"available","steps":["Create a website resource","Submit files to the deployment workflow","Open the preview and verify it","Publish or roll back a version"],"deliverables":["Immutable website version","Staging preview URL","QA report","Production URL and rollback support"],"constraints":["The current version targets static websites and URLs are provided by the configured hosting provider","Dynamic backends, databases, and custom domains require separate deployment or configuration","Source builds depend on WEBSITE_BUILD_ENABLED; build and QA must pass before publishing"]},"intake":{"mode":"workflow","onlineUploadAvailable":true,"websiteResourceRequired":true,"createEndpoint":{"method":"POST","path":"/api/v1/websites"},"deployEndpoint":{"method":"POST","path":"/api/v1/websites/:id/deploy"},"statusEndpoints":[{"method":"GET","path":"/api/v1/workflow-runs/:workflowRunId"},{"method":"GET","path":"/api/v1/workflow-runs/:workflowRunId/tasks"}],"lifecycleEndpoints":[{"method":"POST","path":"/api/v1/websites/:id/promote"},{"method":"POST","path":"/api/v1/websites/:id/rollback"}],"fields":["websiteId","files","source","provider","operationId","idempotencyKey","versionId"]},"pricing":{"model":"none","status":"no_charge","amount":0,"note":"website.deploy 当前不扣 Credits；网站 Agent 生成单独按 Agent Credits 计费。"},"locales":{"zh":{"title":"网站生成与部署","summary":"把静态网站构建、预览、检查并发布到 Toolkit 托管地址。"},"en":{"title":"Website generation and deployment","summary":"Build, preview, verify, and publish a static website to a Toolkit hosted URL."}},"agent":{"callable":true,"endpoints":{"createWebsite":{"method":"POST","path":"/api/v1/websites"},"deploy":{"method":"POST","path":"/api/v1/websites/:id/deploy"},"workflowRun":{"method":"GET","path":"/api/v1/workflow-runs/:workflowRunId"},"workflowTasks":{"method":"GET","path":"/api/v1/workflow-runs/:workflowRunId/tasks"},"publish":{"method":"POST","path":"/api/v1/websites/:id/promote"},"rollback":{"method":"POST","path":"/api/v1/websites/:id/rollback"},"mcp":null},"authentication":{"discovery":"public","execution":"session_or_api_token"},"pricing":{"status":"no_charge","amount":0,"model":"none","note":"website.deploy is currently not metered; website Agent generation is billed separately"},"requiresHumanReview":false,"executionStatus":"available","discoveryTerms":["website deployment","static website","网站部署","发布网站"],"nextAction":"Create a website with POST /api/v1/websites when you do not have a websiteId. Then call POST /api/v1/websites/:id/deploy with a stable Idempotency-Key and input.files or input.source. Deployment is asynchronous: poll workflowRunId and its tasks; the workflow publishes automatically after QA passes.","nextActionEn":"Create a website with POST /api/v1/websites when you do not have a websiteId. Then call POST /api/v1/websites/:id/deploy with a stable Idempotency-Key and input.files or input.source. Deployment is asynchronous: poll workflowRunId and its tasks; the workflow publishes automatically after QA passes.","discoveryUrl":"https://toolkit.fun/solutions.json","contract":{"schemaVersion":"toolkit.workflow-contract.v1","workflow":{"slug":"website.deploy","asynchronous":true,"stages":["website.build","website.preview","website.qa","website.publish"],"requirement":"website.deploy runs build, preview, QA and publish in order; publish is allowed only after QA passes","completion":"website.deploy publishes automatically after QA; use lifecycle.publish for a separately built version"},"authentication":{"discovery":"public","execution":"session_or_api_token","header":"Authorization: Bearer <toolkit-api-token>"},"idempotency":{"header":"Idempotency-Key","bodyField":"idempotencyKey","retry":"reuse the same key after an unknown response; do not create a new deployment"},"resources":{"create":{"method":"POST","path":"/api/v1/websites","headers":{"authorization":"required"},"body":{"provider":"optional","workspaceId":"optional","projectId":"optional","metadata":"optional object"},"output":["website.id","website.provider","website.status"]},"ownership":"websiteId is owner-scoped to the authenticated user or token subject"},"deploy":{"method":"POST","path":"/api/v1/websites/:id/deploy","headers":{"authorization":"required","idempotencyKey":"required for safe retries","operationId":"optional X-Operation-Id or body.operationId"},"body":{"input":{"requiredOneOf":["files","source"],"files":{"forms":["object { \"index.html\": \"<html>...</html>\" }","array [{ path: \"index.html\", content: \"<html>...</html>\" }]"],"requirements":["relative paths only","index.html required by QA","JSON API file content is UTF-8 text","2 MiB maximum per file and 8 MiB maximum total by default"]},"source":{"status":"configuration_dependent","forms":["{ files: [{ path: \"package.json\", content: \"...\" }], build: { command: \"npm run build\", outputDir: \"dist\" } }"],"requirements":["source.files is required; source.build is optional and defaults to npm run build with outputDir dist","only npm run build/generate/export is accepted","disabled unless WEBSITE_BUILD_ENABLED=true"]}},"provider":"optional; defaults to the website provider","operationId":"optional stable operation identifier"},"response":{"created":201,"idempotentReplay":200,"fields":["workflowRunId","workflowTaskId","workerJobId"],"note":"The response acknowledges queueing. It does not contain the final preview or live URL."}},"status":{"run":{"method":"GET","path":"/api/v1/workflow-runs/:workflowRunId"},"tasks":{"method":"GET","path":"/api/v1/workflow-runs/:workflowRunId/tasks"},"terminalOutputs":["versionId","previewUrl","liveUrl","report","step summary"]},"lifecycle":{"publish":{"method":"POST","path":"/api/v1/websites/:id/promote","body":{"input":{"versionId":"qa-passed version id"}}},"rollback":{"method":"POST","path":"/api/v1/websites/:id/rollback","body":{"input":{"versionId":"previous version id"}}}},"pricing":{"status":"no_charge","model":"none","note":"website.deploy currently does not reserve credits; Agent website generation is metered separately and returns its own receipt"},"errors":["LOGIN_REQUIRED","website 不存在","website build requires at least one file","website QA requires index.html","website publish requires a version that passed QA","WEBSITE_BUILD_DISABLED","WEBSITE_BUILD_COMMAND_UNSUPPORTED","WEBSITE_BUILD_PACKAGE_REQUIRED","WEBSITE_BUILD_PACKAGE_INVALID","WEBSITE_BUILD_SCRIPT_MISSING","WEBSITE_BUILD_SOURCE_TOO_LARGE","WEBSITE_BUILD_OUTPUT_EMPTY","WEBSITE_BUILD_TIMEOUT"]}}}