技能 硬件工程 Hex集成多平台部署

Hex集成多平台部署

v20260423
hex-deploy-integration
该技能用于将Hex编排服务部署到主流云平台,如Vercel、Google Cloud Run和Fly.io。它支持设置生产环境,配置平台特定的密钥和环境变量,是构建Hex驱动应用的自动化部署流水线和生产环境部署的关键工具。
获取技能
339 次下载
概览

Hex Deploy Integration

Overview

Deploy Hex orchestration services that trigger project runs from web endpoints or cron jobs.

Instructions

Vercel — On-Demand Data Refresh

// api/refresh.ts
export default async function handler(req, res) {
  const response = await fetch(`https://app.hex.tech/api/v1/project/${process.env.HEX_PROJECT_ID}/run`, {
    method: 'POST',
    headers: { 'Authorization': `Bearer ${process.env.HEX_API_TOKEN}`, 'Content-Type': 'application/json' },
    body: JSON.stringify({ inputParams: req.body || {}, updateCacheResult: true }),
  });
  res.json(await response.json());
}
vercel env add HEX_API_TOKEN production
vercel env add HEX_PROJECT_ID production

Cloud Run — Scheduled Orchestrator

gcloud run deploy hex-orchestrator \
  --image gcr.io/$PROJECT_ID/hex-orchestrator \
  --set-secrets=HEX_API_TOKEN=hex-api-token:latest \
  --timeout=600

Resources

信息
Category 硬件工程
Name hex-deploy-integration
版本 v20260423
大小 1.57KB
更新时间 2026-04-28
语言