Skip to content

Commit

Permalink
Update service-deploy.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
nidhibajaj213 authored Sep 19, 2024
1 parent 645b174 commit 4e1733d
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/service-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- main

env:
EC2_PUBLIC_IP: ai-nidhi.devops-days-upes.com # TODO replace to your EC2 instance public IP
EC2_PUBLIC_IP: ai-nidhi.devops-days-upes.com # TODO replace to your EC2 instance public IP
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} # TODO define this secret in your GitHub repo settings

jobs:
Expand All @@ -20,16 +20,15 @@ jobs:
- name: SSH to EC2 instance
run: |
echo "$SSH_PRIVATE_KEY" > mykey.pem
chmod 400 mykey.pem
chmod 600 mykey.pem
# Copy the files from the current work dir into the EC2 instance, under `~/app`.
# Copy the files from the current work dir into the EC2 instance, under ~/app.
scp -o StrictHostKeyChecking=no -i mykey.pem -r * ubuntu@$EC2_PUBLIC_IP:~/app
# Connect to your EC2 instance and execute the `deploy.sh` script (this script is part of the repo files).
# TODO You need to implement the `deploy.sh` script yourself.
# Connect to your EC2 instance and execute the deploy.sh script (this script is part of the repo files).
# TODO You need to implement the deploy.sh script yourself.
#
# Upon completion, the NetflixMovieCatalog app should be running with its newer version.
# To keep the app running in the background independently on the terminal session you are logging to, configure it as a Linux service.
ssh -i mykey.pem ubuntu@$EC2_PUBLIC_IP "bash ~/app/deploy.sh"

0 comments on commit 4e1733d

Please sign in to comment.