i try using pipeline and deployment in bitbucket , ussually using jenkins.
here example code
image: node:10
pipelines:
default:
- step:
script:
- npm install
- npm install -g mocha pm2
- pm2 start server.js
- mocha
That script was working fine , but how to deployment automaticly to aws ec2 instance already i made it