.gitlab-ci.yml 示例:stages: - build - test - deploy default: image: node:20-alpine cache: key: "v1-$CI_COMMIT_REF_SLUG" paths: - node_modules/ - build/ policy: pull-push variables: NODE_ENV: production build: stage: build script: - npm ci - npm run build artifacts: paths: - build/ expire_in: 1 week test: stage: test script: - npm run test -- --ci dependencies: - build deploy: stage: deploy rules: - if: "$CI_COMMIT_BRANCH == 'main'" script: - echo Deploying dependencies: - build

点赞(0) 打赏

评论列表 共有 0 条评论

暂无评论
立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部