GitLab CI/CD
使用GitLab CI/CD实现自动化构建和部署。
.gitlab-ci.yml示例
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
| stages:
- build
- test
- deploy
build:
stage: build
script:
- npm install
- npm run build
test:
stage: test
script:
- npm test
deploy:
stage: deploy
script:
- echo "Deploying to production..."
only:
- main
|
优势