Excerpt from a CircleCI config file:
deploy:
machine:
enabled: true
steps:
- run:
name: AWS EC2 deploy
command: |
ssh -o "StrictHostKeyChecking no" [email protected] "cd ~/circleci-aws; git pull; npm i; npm run build; pm2 restart build/server
How can I break the command into multiple lines? Tried below syntax, but it only runs the first command:
deploy:
machine:
enabled: true
steps:
- run:
name: Deploy
command: |
ssh -o StrictHostKeyChecking=no [email protected]
cd ~/circleci-aws
git pull
npm i
npm run build
pm2 restart build/server
pm2 restart build/server
command. How is it possible that pm2 is available? I have explored the internet and I mostly found out that CirclecCI won't have pm2 access of the machine. Can you please help here in understanding it. – Petro