360 Secure SkillHub
360 安全技能中心

byted-bp-cdn-pagesdeploy

面向 Coding Agent 的静态网站托管 Skill,通过 bash 脚本封装 nest CLI,将本地静态站点一键部署到 BytePlus / VolcEngine Edge Pages,支持自动创建或更新项目、指定加速区域、绑定与验证自定义域名,并提供项目列表、详情、部署历史查询及本地预览、下线删除等管理操作。使用前需配置 AK/SK。

分类:开发
fanyao00-cloud
fanyao00-cloud
热度 29.90
最近更新 2026-05-18 11:52:22

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add fanyao00-cloud/byted-bp-cdn-pagesdeploy
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
byted-bp-cdn-pagesdeploy
description
One-click deployment of static websites to BytePlus / VolcEngine Edge Pages platform, supporting auto project creation, update deployment, custom domain binding, and CDN acceleration.

Pages Deploy Skill

Overview

One-click deployment of static website code to BytePlus / VolcEngine Edge Pages platform. Designed for use in Coding Agents (Cursor, Claude Code, Trae, etc.) to quickly complete hosting, building, and CDN integration after generating static web pages.

Use Cases

  • Deploy static web code generated by Coding Agent
  • Deploy local static sites to global CDN
  • Bind custom domains to deployed sites
  • Iteratively update existing Pages projects

Prerequisites

  1. AK/SK Configuration: Requires BytePlus / VolcEngine Access Key and Secret Key
    • Mira client: Stored in secrets/byteplus.json, format: {"access_key": "xxx", "secret_key": "xxx"}
    • Manual config: nest config set -g cloud.access_key YOUR_AK && nest config set -g cloud.secret_key YOUR_SK
  2. Static site directory: A directory containing index.html

CLI Commands

Full Deployment (Auto-detects create vs. update)

# Auto-detect: creates project if not exists, updates deployment if exists
bash /path/to/scripts/deploy.sh --name my-site --dir ./dist

# Specify description and acceleration region
bash /path/to/scripts/deploy.sh --name my-site --dir ./dist --desc "AI generated site" --region global

# Bind custom domain
bash /path/to/scripts/deploy.sh --name my-site --dir ./dist --domain www.example.com

Parameters

Parameter Required Description
--name Yes Pages project name
--dir Yes Static site resource directory (must contain index.html)
--desc No Project description
--region No Acceleration region: global / chinese_mainland / outside_chinese_mainland
--domain No Custom domain
--build-cmd No Build command to run before deployment (e.g. npm run build)
--secrets-file No AK/SK config file path (default: secrets/byteplus.json)

Other Operations

# List projects
bash /path/to/scripts/manage.sh list

# Show project details
bash /path/to/scripts/manage.sh get --pages p-xxx

# Show deployment history
bash /path/to/scripts/manage.sh deployments --pages p-xxx

# Local preview
bash /path/to/scripts/manage.sh serve --dir ./dist --port 8080

# Domain management
bash /path/to/scripts/manage.sh domain-list --pages p-xxx
bash /path/to/scripts/manage.sh domain-add --pages p-xxx --domain www.example.com
bash /path/to/scripts/manage.sh domain-verify --pages p-xxx --domain www.example.com

# Offline / Delete
bash /path/to/scripts/manage.sh offline --pages p-xxx
bash /path/to/scripts/manage.sh delete --pages p-xxx

Complete Workflow

Step 0: Environment Setup (one-time) → Install CLI + Configure AK/SK
Step 1: Coding Agent generates code → ./my-site/
Step 2: Local preview → nest pages serve ./my-site
Step 3: Deploy → deploy.sh --name xxx --dir ./my-site
Step 4: Check domain → manage.sh get --pages p-xxx
Step 5: Bind domain → deploy.sh --name xxx --dir ./my-site --domain www.example.com
Step 6: Iterative update → deploy.sh --name xxx --dir ./my-site
Step 7: Manage → manage.sh list / deployments / offline

Notes

  • China mainland production does not provide a default domain; a custom domain must be bound for access
  • CLI package name is @byteplus/nest (not @byted/nest)
  • CDN propagation takes 1-5 minutes after deployment
  • Custom domains require adding a CNAME record at your DNS provider