I already have setup EC2 server and have a pull-code.sh file with commands listed to deploy the application in EC2 server.
The bash script does the following steps.
1. Pull the latest code from the master branch
2. Run migrations
3. Restart the server
The pipeline documentation states to configure an S3 bucket and upload the zip file for deployment. It is not getting clear from where this zip file will come and how to upload to S3 in each cycle.
In my case, I only want to run the script each time pipeline is run which will further handle the deployment as specified in the script.
bash pull-code.sh
How can I configure the pipeline to run the bash command only by SSHing to the EC2 server? Do I still need to configure S3 Bucket?