stages: # 分段 - install - build - deploy-sit - deploy-prodcache: # 缓存 paths: - node_modules - distinstall-job: tags: - sit only: - sit - prod stage: install script: - cnpm installbuild-job: tags: - sit only: - sit - prod stage: build script: - npm run builddeploy-sit-job: tags: - sit only: - sit stage: deploy-sit script: - sshpass -p $PASSWORD scp -r ./dist/* $USER_NAME@$IP:/root/backend-cicd/app/publicdeploy-prod-job: tags: - sit only: - prod stage: deploy-prod script: - sshpass -p $PASSWORD scp -r ./dist/* $USER_NAME@$IP:/root/backend-cicd/app/public