Skip to content

Commit

Permalink
changed key.pem in server.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Shadi38 committed Feb 13, 2024
1 parent a575aa1 commit 0094db8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,18 @@ jobs:
- name: Set permissions for private key

run: |
echo "${{ env.AWS_PRIVATE_KEY }}" > serveraws.pem
echo "${{ env.AWS_PRIVATE_KEY }}" > key.pem
chmod 600 serveraws.pem
- name: Pull Docker image
run: |
ssh -o StrictHostKeyChecking=no -i serveraws.pem [email protected] 'sudo docker pull shadi38/node-app:4.0'
ssh -o StrictHostKeyChecking=no -i key.pem [email protected] 'sudo docker pull shadi38/node-app:4.0'
- name: Stop running container
run: |
ssh -o StrictHostKeyChecking=no -i serveraws.pem [email protected] 'sudo docker stop node-app:4.0 || true'
ssh -o StrictHostKeyChecking=no -i serveraws.pem [email protected] 'sudo docker rm node-app:4.0 || true'
ssh -o StrictHostKeyChecking=no -i key.pem [email protected] 'sudo docker stop node-app:4.0 || true'
ssh -o StrictHostKeyChecking=no -i key.pem [email protected] 'sudo docker rm node-app:4.0 || true'
- name: Run new container
run: |
ssh -o StrictHostKeyChecking=no -i serveraws.pem [email protected] 'sudo docker run -d --name node-app -p 3000:3000 shadi38/node-app:4.0'
ssh -o StrictHostKeyChecking=no -i key.pem [email protected] 'sudo docker run -d --name node-app -p 3000:3000 shadi38/node-app:4.0'
Expand Down

0 comments on commit 0094db8

Please sign in to comment.