deploy
@ea-toolkit · 收录于 1 周前
Build and deploy static sites (catalog-ui, docs-site) to Firebase Hosting. Supports dry-run preview, selective target deployment, and automatic build detection.
适合你,如果你需要快速部署静态网站到 Firebase
/ 下载安装
用别的 agent?下载 .zip 解压,把文件夹放进它的技能目录
Claude Code
~/.claude/skills/(项目级 .claude/skills/)Codex CLI
~/.codex/skills/Cursor自动读取上面两处目录
其他工具见其文档的「skills」目录;两个下载是同一份文件,只是名字不同
/ 通过 npx 安装 校验哈希
npx oh-my-skill add ea-toolkit/architecture-catalog/deploy/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- ea-toolkit/architecture-catalog/deploy/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify ea-toolkit/architecture-catalog/deploy安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
35GitHub stars
~654上下文体积 · 单文件
镜像托管
怎么用
技能原文 SKILL.md
Deploy to Firebase Hosting
Build and deploy the catalog UI and/or docs site to Firebase Hosting.
Arguments
$ARGUMENTSmay contain:--dry-run— Build only, skip deploy. Show what would be deployed.--target catalog— Deploy only the catalog UI--target docs— Deploy only the docs site--target all— Deploy both (default)- No arguments = build and deploy all targets
Workflow
1. Parse Arguments
Extract flags from $ARGUMENTS:
- Check for
--dry-runflag - Check for
--target <value>(default:all)
2. Validate Prerequisites
Run these checks before proceeding:
# Check Firebase CLI is installed which firebase || echo "ERROR: Firebase CLI not installed. Run: npm install -g firebase-tools" # Check Firebase auth firebase projects:list --limit 1 2>&1 || echo "ERROR: Not authenticated. Run: firebase login" # Check firebase.json exists test -f firebase.json || echo "ERROR: firebase.json not found in project root"
If any check fails, report the error and stop.
3. Build
Based on --target:
Catalog UI (target = catalog or all):
cd catalog-ui && npm ci && npm run build
Report build output size: du -sh catalog-ui/dist
Docs Site (target = docs or all):
cd docs-site && npm ci && npm run build
Report build output size: du -sh docs-site/dist
4. Deploy (skip if --dry-run)
firebase deploy --only hosting
If targeting a specific site:
firebase deploy --only hosting:catalog # or firebase deploy --only hosting:docs
5. Report
On dry-run:
**Dry Run Complete** | Target | Build | Size | |--------|-------|------| | Catalog UI | OK | X MB | | Docs Site | OK | X MB | Ready to deploy. Run `/deploy` (without --dry-run) to push to Firebase.
On deploy:
**Deployed Successfully** | Target | URL | |--------|-----| | Catalog UI | https://architecture-catalog.web.app | | Docs Site | https://docs-architecture-catalog.web.app | Firebase project: ea-toolkit-demo-ac513
Error Handling
- If build fails, show the error output and stop. Do not deploy a broken build.
- If deploy fails, show the Firebase error. Common fix:
firebase loginto re-authenticate. - If
node_modules/is missing,npm cihandles it automatically.
Notes
- The CI/CD pipeline (
.github/workflows/deploy.yml) auto-deploys on push to main. This skill is for manual/preview deployments. - Firebase project ID:
ea-toolkit-demo-ac513(from.firebaserc) - Hosting targets:
catalog→architecture-catalog,docs→docs-architecture-catalog
按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →
评论
登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。
…