CircleCI 配置文件的摘录:
deploy:
machine:
enabled: true
steps:
- run:
name: AWS EC2 deploy
command: |
ssh -o "StrictHostKeyChecking no" ubuntu@xxx.xxx.xxx.xxx "cd ~/circleci-aws; git pull; npm i; npm run build; pm2 restart build/server
如何将命令分成多行?尝试了以下语法,但它只运行第一个命令:
deploy:
machine:
enabled: true
steps:
- run:
name: Deploy
command: |
ssh -o StrictHostKeyChecking=no ubuntu@xxx.xxx.xxx.xxx
cd ~/circleci-aws
git pull
npm i
npm run build
pm2 restart build/server