一键导入
deployment
Deployment workflow for Astro sites on Cloudflare Pages + GitHub. Staging → Production flow. Use before first deploy.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Deployment workflow for Astro sites on Cloudflare Pages + GitHub. Staging → Production flow. Use before first deploy.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Canonical lead-gen tracking for Astro.js on Cloudflare Workers (v6, Run 6 contract). Drop-in components: <Tracking/>, <TrackedForm/>, <PhoneLink/>, <CallbackButton/>. Two channels with a SHARED event_id: browser (GTM → GA4 / Meta Pixel / Google Ads) + server-side via the Soborbo event-gateway worker. Model 2: the browser OWNS on-site GA4 + Google Ads; the server sends Meta CAPI on-site (+ TikTok/LinkedIn/Microsoft click-ID forwarders, event_id-deduped) and Google Ads ONLY offline (CRM lead lifecycle, Google Data Manager API); the server sends NO GA4. Two gateway ingress paths: tokenless browser path for low-risk clicks (Origin allow-list + rate limit), authenticated server path (per-site token, service binding) for form/lead/purchase conversions dispatched by the site BACKEND. No Turnstile. Daily synthetic smoke-lead cron + digest guard. Consent Mode v2 + CookieYes, gclid/gbraid/wbraid/fbclid + full UTM capture, calculator funnel, form abandonment, phone dedup, first/last touch attribution. Bilingual / multi-
DEPRECATED (legacy, in old/) — use the `soborbo-tracking` skill instead for GA4 + Meta + Google Ads tracking on Astro. Kept for reference only.
Audit and strengthen visible E-E-A-T signals and AI-search (GEO) readiness on Astro lead-gen sites. Use when a page or site needs Experience/Expertise/Authoritativeness/Trust signals, author credibility, first-hand-experience proof, trust pages (about/contact/privacy/returns), NAP + company registration display, review/trust-mark surfacing, AI-crawler access in robots.txt, or answer-first content for ChatGPT/Gemini/Perplexity/AI Overviews. Also triggers on "EEAT", "E-E-A-T", "GEO", "AEO", "AI search visibility", "get cited by AI", "trust signals", "author bio", "local trust", or making a small/niche business outrank larger competitors. Runs a deterministic auditor with runnable tests. Delegates JSON-LD generation to schema-entity-graph and JSON-LD validation to schema-audit; delegates copy voice to humanise-copy.
Width-based responsive image patterns for Astro. Local build-time processing, per-format quality (AVIF/WebP/JPG/PNG), alpha-aware fallback, art direction, face-focus, OG generation, image SEO. Picture, ArtPicture, FixedImage components.
Per-site client tracker and Astro endpoint for the centralised soborbo-error-pipeline workers. Captures client JS errors via sendBeacon, forwards via console.error → Tail Worker. Server-side uncaught exceptions are captured automatically. ~1.5KB client bundle, no external deps. Email throttled to 1 per (site, code) per 4 hours by the notifier worker.
Form infrastructure for Astro projects. Contact forms, booking forms, quote requests. Zod validation, email delivery (Resend/Brevo), rate limiting, Google Sheets, postcode lookup, spam protection.
基于 SOC 职业分类
| name | deployment |
| description | Deployment workflow for Astro sites on Cloudflare Pages + GitHub. Staging → Production flow. Use before first deploy. |
Defines deployment workflow for Astro sites. Cloudflare Pages + GitHub only.
| ✅ Supported | ❌ Out of Scope |
|---|---|
| Cloudflare Pages | Vercel, Netlify |
| GitHub repos | GitLab, Bitbucket |
| Single-site projects | Monorepos |
| Astro static/SSR | Other frameworks |
Deployment BLOCKED if any:
| Condition | Check |
|---|---|
| Build fails | npm run build |
| TypeScript errors | npx astro check |
| Missing env var | Dashboard check |
| Lighthouse < 90 | All categories |
| Forms not working | Test submission |
| Staging indexable | robots.txt / noindex |
| No client approval | Written confirmation |
If blocked → FIX first, do not deploy.
Set in Cloudflare Dashboard → Settings → Environment Variables
| Variable | Required | Notes |
|---|---|---|
PUBLIC_SITE_URL | ✅ | Full URL with https |
TURNSTILE_SITE_KEY | ✅ | Different for prod/preview |
TURNSTILE_SECRET_KEY | ✅ | Secret |
RESEND_API_KEY | ✅ | Email sending |
GTM_ID | ✅ | Analytics |
Missing required env var = deployment BLOCKED.
Never:
.env to gitwrangler.toml| Branch | Environment | URL |
|---|---|---|
main | Production | domain.com |
staging | Preview | staging.domain.com |
feature/* | Preview | [hash].pages.dev |
Type Name Content Proxy
CNAME @ [project].pages.dev ✓
CNAME www [project].pages.dev ✓
Required: Choose one:
| Method | When to Use |
|---|---|
| Cloudflare Access | Client needs to review |
| robots.txt + noindex | Internal only |
<!-- BaseLayout.astro - always include -->
{import.meta.env.MODE !== 'production' && (
<meta name="robots" content="noindex, nofollow" />
)}
| Type | Tool | Required |
|---|---|---|
| Analytics | Cloudflare Analytics | ✅ |
| Uptime | Cloudflare or UptimeRobot | ✅ |
| Search | Google Search Console | ✅ |
| Errors | Console or Sentry | Recommended |
Basic uptime monitoring is NOT optional.
npm run build passesnpx astro check clean# Via Dashboard
Pages → Project → Deployments → [Previous] → "Rollback"
# Via CLI
npx wrangler pages deployment list --project-name=[name]
npx wrangler pages deployment rollback --project-name=[name] [id]
Test rollback BEFORE you need it.