来自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
pm2 restart build/server
命令,我有疑问。pm2 怎么可能可用?我已经搜索了互联网,大多数情况下发现 CirclecCI 没有机器上的 pm2 访问权限。你能帮忙理解吗? - Shadab