Linux上高效使用 GitLab 进行协作
一 基础环境与安全配置
二 协作流程与权限模型
三 高效 CI/CD 流水线
stages:
- build
- test
- deploy
variables:
NODE_ENV: production
cache:
paths:
- node_modules/
build_job:
stage: build
script:
- npm ci
- npm run build --if-present
test_job:
stage: test
script:
- npm test -- --ci
deploy_prod:
stage: deploy
script:
- ./deploy.sh prod
only:
- main
when: manual
四 多项目协同与规模化实践
五 性能与稳定性优化