TopRank Skills

Home / Claw Skills / DevOps / Web Deploy
Official OpenClaw rules 36%

Web Deploy

web deploy

Stars

0

Installs

0

Status

ACTIVE

Visibility

PUBLIC

安装方式

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 Web Deploy 技能。 若已安装,则直接安装 Web Deploy 技能。

Overview

Skill Key
cmanfre7/web-deploy
Author
cmanfre7
Source Repo
openclaw/skills
Version
-
Source Path
skills/cmanfre7/web-deploy
Latest Commit SHA
c4cf1214669949ca0715267dadf45a88f6047de6

Extracted Content

SKILL.md excerpt

# web-deploy

Build and deploy websites, web apps, and APIs to production.

## Local Preview Workflow

```bash
# Static site
npx http-server ./dist -p 8080 -c-1

# Next.js
npm run dev          # Development (hot reload)
npm run build && npm run start  # Production preview

# FastAPI
uvicorn app.main:app --reload --port 8000

# Vite-based
npm run dev          # Dev server
npm run build && npx serve dist  # Production preview
```

## Deployment Targets

### Vercel (Frontend / Next.js / Static)

```bash
# First time setup
npx vercel link

# Preview deployment
npx vercel

# Production deployment
npx vercel --prod

# Environment variables
npx vercel env add SECRET_KEY
```

**Best for:** Next.js apps, React SPAs, static sites, serverless functions.

**Config:** `vercel.json` (usually not needed for Next.js)
```json
{
  "buildCommand": "npm run build",
  "outputDirectory": "dist",
  "framework": "nextjs"
}
```

### Railway (Backend / APIs / Databases)

```bash
# First time setup
railway login
railway init

# Deploy
railway up

# Add database
railway add --plugin postgresql

# Environment variables
railway variables set SECRET_KEY=value

# View logs
railway logs
```

**Best for:** Backend APIs, databases, long-running processes, Docker containers.

### GitHub Pages (Static Sites)

```bash
# Using gh-pages package
npm install -D gh-pages
# Add to package.json scripts: "deploy": "gh-pages -d dist"
npm run build && npm run deploy
```

**Best for:** Documentation, simple static sites, project pages.

### Canvas (Clawdbot Workspace)

Deploy to `~/clawd/canvas/` for local serving through the clawdbot gateway.
```bash
cp -r ./dist/* ~/clawd/canvas/my-project/
```

## Pre-Deploy Checklist

- [ ] Build succeeds locally (`npm run build` / `python -m build`)
- [ ] No TypeScript/lint errors
- [ ] Tests pass
- [ ] Environment variables set on target platform
- [ ] `.env` / secrets NOT in git
- [ ] `robots.txt` and `sitemap.xml` if public site
- [ ] Favicon and meta tags set
- [ ] HTTPS...

Related Claw Skills