1---2name: deploy-website3description:4 Publish the first release of an existing local website project or standalone local `.html` or5 `.htm` file to a public URL. Use when a user asks to deploy or launch a local website, static6 site, frontend project, or asks to deploy an absolute HTML file path; use edit-deployed-website to7 edit an already deployed website.8descriptions:9 zh-Hans: '支持静态网站部署,适合前端网站分享、作品展示和快速发布。'10 en: 'Deploy static websites — ideal for sharing frontend sites, showcasing work, and publishing quickly.'11displayNames:12 zh-Hans: '网站部署'13 en: 'Deploy Website'14metadata:15 source: https://skillmd.com/skills/minimax-ai/deploy-website16---1718# Deploy Website19201. Resolve the requested target without rewriting its native path syntax. If the user supplied an21 HTML path, require a regular `.html` or `.htm` file; reject a missing file, directory, symlink,22 or control characters. Never pass a path outside the current workspace to `website_deploy`.232. Locate the project source root. Reuse its lockfile and existing package manager. Discover its24 real build command and built-site output from the project configuration; do not add dependencies25 or invent a build. If a real build exists, run it and verify the output has a regular26 `index.html` at its root.273. For a standalone site with no project build, first check whether its source directory is already28 a self-contained public static directory with a regular root `index.html` and locally resolving29 dependencies. If so, verify it and use that directory directly. Otherwise, for a standalone HTML30 file or a page whose dependencies need rewriting, prepare a new staging directory inside the31 current workspace without modifying the source. Never pass an HTML file itself as `path`. If the32 selected file is outside the workspace, first create a separate source snapshot inside the33 workspace containing only the selected source and required assets; stop if the source cannot be34 accessed or its dependencies cannot be copied safely. Create a regular `index.html` at the35 deployment staging root and copy only the static files required by the requested page. Preserve36 or safely rewrite relative URLs, root-relative assets, `<base>` URLs, CSS `url()` references,37 JavaScript imports, and fetch targets, then verify the staged page. Stop and explain the38 unresolved dependency instead of publishing a broken page or copying an entire source tree that39 may contain private files. Do not use symlinks, `/tmp`, or Unix-only path logic; keep Windows40 drive and UNC paths in their native form.414. Use the verified build or deployment staging directory as `path`. Use the original project/source42 root as `source_path` only when it is inside the workspace; otherwise use the isolated source43 snapshot. A source directory that is already a self-contained public static site, with a regular44 root `index.html`, may use that same directory for both `path` and `source_path`; the runtime45 still uploads separate public and private archives. A standalone HTML file or a page whose46 dependencies need rewriting must use the distinct staging directory from step 3. A framework47 project must still use its actual build output for `path` and its source root for `source_path`.48 `path` must have a regular `index.html` at its root. Choose a short human-readable49 `project_name`.505. Before publishing, state that the website will be publicly accessible and `source_path` will be51 uploaded to private cloud storage. There is currently no secrets scanner: ask the user to confirm52 `source_path` contains no secrets, then obtain explicit publication confirmation.536. Call the existing `website_deploy({ path, source_path, project_name })` tool. Do not create a zip54 or upload with HTTP, OSS, or another tool.557. Follow the existing `website_deploy` delivery format using only the tool-returned URL and56 `node_id`. Never guess or hand-write `cover`; let Runtime's trusted projection control final57 `node_id`/`cover`. Surface a tool failure as returned.