Skip to content

Commit

Permalink
Merge pull request #50 from lordgrim18/build
Browse files Browse the repository at this point in the history
perf(actions): connect to ec2 using ssh
  • Loading branch information
lordgrim18 authored Jul 11, 2024
2 parents 4a6ccb4 + cc13dd3 commit ba4a4ec
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/CD_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ jobs:
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2

- name: Move to the directory containing the Dockerfile
run: |
cd ..
cd ..
cd ..
cd ./app/Key-Ring
- name: Update git branch
run: git pull origin prod
- name: Add SSH Key
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.EC2_SSH_KEY }}

- name: Update Deployment
run: make deploy
- name: SSH into EC2 and deploy
run: |
ssh -o StrictHostKeyChecking=no ec2-user@${{ secrets.EC2_PUBLIC_IP }} << 'EOF'
cd /path/to/your/project
git pull origin prod
make deploy
EOF

0 comments on commit ba4a4ec

Please sign in to comment.