360 Secure SkillHub
360 安全技能中心

W-Spaces Deploy

提供一组 Bash 脚本,用于在 W-Spaces 平台创建静态站点项目、推送 HTML/CSS/JS 代码并将站点部署为线上地址,同时支持账号注册登录与 API 密钥的创建、列出、吊销;需配置 API 密钥并通过网络调用平台接口完成全部操作。

trandactruong
trandactruong
热度 58.23
最近更新 2026-05-17 15:38:10
分类:开发依赖:代码执行 / 读写文件 / 第三方 API应用场景:DevOps / 自动化脚本 / 工作流 / API 集成

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add wspaces-deploy
Metadata
name
wspaces-deploy
description
Deploy static websites to W-Spaces. Use when deploying HTML/CSS/JS sites, landing pages, or single-page apps to wspaces.app. Supports project creation, code push, and deployment via API key authentication.

W-Spaces Deployment

Deploy static websites to W-Spaces (wspaces.app). Create projects, push HTML, and deploy to a live URL — all via API.

Configuration

Get your API key

  1. Register: scripts/wspaces_auth.sh --register --email you@example.com --password yourpass --name "Your Name"
  2. Verify your email (check inbox)
  3. Login: scripts/wspaces_auth.sh --login --email you@example.com --password yourpass
  4. Copy the API key from the response

Set the API key

export WSPACES_API_KEY="wsk_live_xxxx..."

Or store in .env:

WSPACES_API_KEY=wsk_live_xxxx...

Operations

Create a project

scripts/wspaces_project.sh --create --name "My Landing Page"

Response includes project ID and slug.

Push HTML code

# From a file
scripts/wspaces_push.sh --project <project-id> --file ./index.html

# From inline HTML
scripts/wspaces_push.sh --project <project-id> --html "<html><body><h1>Hello</h1></body></html>"

Deploy to live URL

scripts/wspaces_deploy.sh --project <project-id>

Result: https://<slug>.wspaces.app

List projects

scripts/wspaces_project.sh --list

Check project details

scripts/wspaces_project.sh --get --id <project-id>

View deployments

scripts/wspaces_deploy.sh --list --project <project-id>

Common Workflows

Deploy a landing page

# 1. Create project
scripts/wspaces_project.sh --create --name "Startup Landing"
# → project ID: abc-123

# 2. Push code
scripts/wspaces_push.sh --project abc-123 --file ./index.html

# 3. Deploy
scripts/wspaces_deploy.sh --project abc-123
# → https://startup-landing-xyz.wspaces.app

Update existing site

# Push new code (creates new version)
scripts/wspaces_push.sh --project abc-123 --file ./index.html

# Redeploy
scripts/wspaces_deploy.sh --project abc-123

Full flow from scratch

Tell your agent:

  • "Create a W-Spaces project called My Portfolio"
  • "Push this HTML to my W-Spaces project"
  • "Deploy my project to wspaces.app"

API Key Management

# Create additional API key
scripts/wspaces_auth.sh --create-key --name "CI/CD Key"

# List all keys
scripts/wspaces_auth.sh --list-keys

# Revoke a key
scripts/wspaces_auth.sh --revoke-key --id <key-id>

API Reference

See wspaces-api.md for complete API documentation.

Troubleshooting

"WSPACES_API_KEY not set"

export WSPACES_API_KEY="wsk_live_xxx..."

"Invalid API key"

  • Key may be revoked — generate a new one via login
  • Check for extra spaces when copying

"Please verify your email"

  • Check your inbox for verification email
  • Verify before logging in

"Project not found"

  • Verify project ID with scripts/wspaces_project.sh --list