Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #89 from igrowker/devops
Browse files Browse the repository at this point in the history
Deploy to AWS workflow update
  • Loading branch information
sarap13 authored Dec 6, 2024
2 parents 3793734 + 768c20d commit f3edfd7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/CI-CD-Pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ jobs:
echo "${{ secrets.AWS_SSH_KEY }}" > ~/.ssh/pawsome-front.pem
chmod 400 ~/.ssh/pawsome-front.pem
- name: Set up SSH key for Private Instance
run: |
echo "${{ secrets.PRIVATE_INSTANCE_KEY }}" > ~/.ssh/private-instance.pem
chmod 400 ~/.ssh/private-instance.pem
- name: Deploy Backend to AWS EC2
env:
URI: ${{ secrets.URI }}
Expand All @@ -98,7 +103,9 @@ jobs:
JWT_SECRET: ${{ secrets.JWT_SECRET }}
run: |
ssh -o StrictHostKeyChecking=no -i ~/.ssh/pawsome-front.pem ec2-user@${{ secrets.EC2_PUBLIC_IP }} << 'EOF'
ssh -o StrictHostKeyChecking=no -i /private_instance_key.pem ec2-user@${{ secrets.EC2_PRIVATE_IP }} << 'INNER_SSH'
ssh -o StrictHostKeyChecking=no -i ~/.ssh/private-instance.pem ec2-user@${{ secrets.EC2_PRIVATE_IP }} << 'INNER_SSH'
cd /home/ec2-user
if [ ! -d "i004-devops" ]; then
git clone https://github.com/igrowker/i004-devops.git
Expand Down

0 comments on commit f3edfd7

Please sign in to comment.