← 返回
数据分析 中文

CI-CD

Automate builds, tests, and deployments across web, mobile, and backend applications.
自动化 Web、移动端及后端应用的构建、测试与部署。
ivangdavila
数据分析 clawhub v1.0.0 1 版本 99924 Key: 无需
★ 3
Stars
📥 2,571
下载
💾 56
安装
1
版本
#latest

概述

When to Use

Trigger on: automated deployment, continuous integration, pipeline setup, GitHub Actions, GitLab CI, build failing, deploy automatically, CI configuration, release automation.

Platform Selection

StackRecommendedWhy
-------------------------
Web (Next.js, Nuxt, static)Vercel, NetlifyZero-config, auto-deploys, preview URLs
Mobile (iOS/Android/Flutter)Codemagic, Bitrise + FastlanePre-configured signing, app store upload
Backend/DockerGitHub Actions, GitLab CIFull control, self-hosted runners option
MonorepoNx/Turborepo + GHAAffected detection, build caching

Decision tree: If platform handles deploy automatically (Vercel, Netlify) → skip custom CI. Only add GitHub Actions when you need tests, custom builds, or deploy to your own infra.

Quick Start Templates

For copy-paste workflows, see templates.md.

Common Pipeline Pitfalls

MistakeImpactFix
----------------------
Using latest image tagsBuilds break randomlyPin versions: node:20.11.0
Not caching dependencies+5-10 min per buildCache node_modules, .next/cache
Secrets in workflow filesLeaked in logs/PRsUse platform secrets, OIDC for cloud
Missing timeout-minutesStuck jobs burn budgetAlways set: timeout-minutes: 15
No concurrency controlRedundant runs on rapid pushesGroup by branch/PR
Building on every pushWasted resourcesBuild on push to main, test on PRs

Mobile-Specific: Code Signing

The #1 pain point. iOS requires certificates + provisioning profiles. Android requires keystores.

The fix: Use Fastlane Match — stores certs/profiles in git repo, syncs across team and CI.

# One-time setup
fastlane match init
fastlane match appstore

# In CI
fastlane match appstore --readonly

For detailed mobile CI/CD patterns (iOS, Android, Flutter), see mobile.md.

Web-Specific: Build Caching

Next.js/Nuxt builds are slow without cache. The No Cache Detected warning = full rebuild.

# GitHub Actions: persist Next.js cache
- uses: actions/cache@v4
  with:
    path: .next/cache
    key: nextjs-${{ hashFiles('**/package-lock.json') }}

For framework-specific configs, see web.md.

Debugging Failed Builds

Error PatternLikely CauseCheck
------------------------------------
Works locally, fails in CIEnvironment driftNode version, env vars, OS
Intermittent failuresFlaky tests, resource limitsRetry logic, increase timeout
ENOENT / file not foundBuild order, missing artifactCheck needs: dependencies
Exit code 137Out of memoryUse larger runner or optimize
Certificate/signing errorsExpired or mismatched credsRegenerate with Match/Fastlane

What This Doesn't Cover

  • Container orchestration (Kubernetes) → see k8s skill
  • Server configuration → see server skill
  • Monitoring and observability → see monitoring skill

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-28 22:22 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

A股量化 AkShare

mbpz
A股量化数据分析工具,基于AkShare库获取A股行情、财务数据、板块信息等。用于回答关于A股股票查询、行情数据、财务分析、选股等问题。
★ 166 📥 60,239
productivity

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 440 📥 148,004
ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,362 📥 318,920