From 1bee0619b43c21abb9f029aec40965b7cd29982a Mon Sep 17 00:00:00 2001 From: Architecture Designer Date: Tue, 10 Mar 2026 10:01:36 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9E=B6=E6=9E=84:=20=E6=B7=BB=E5=8A=A0CI/CD?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=8C=87=E5=8D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- architecture/ci-cd.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 architecture/ci-cd.md diff --git a/architecture/ci-cd.md b/architecture/ci-cd.md new file mode 100644 index 0000000..c8397fe --- /dev/null +++ b/architecture/ci-cd.md @@ -0,0 +1,35 @@ +# CI/CD 流程配置 + +## GitHub Actions + +```yaml +name: CI/CD + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: '18' + - name: Install dependencies + run: | + cd backend && npm install + cd ../frontend && npm install + - name: Run tests + run: npm test +``` + +## 部署流程 + +1. 代码提交 → 自动测试 +2. 测试通过 → 构建镜像 +3. 镜像推送 → 服务器部署