From 5cc14c23eda870a75209b44242b127878dab1a74 Mon Sep 17 00:00:00 2001 From: shadi fakhri <113238379+Shadi38@users.noreply.github.com> Date: Tue, 13 Feb 2024 17:01:53 +0000 Subject: [PATCH] changed the key.pem --- .github/workflows/server.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/server.yml b/.github/workflows/server.yml index bc500aa944..3a5f0e7f68 100644 --- a/.github/workflows/server.yml +++ b/.github/workflows/server.yml @@ -42,18 +42,18 @@ jobs: - name: Set permissions for private key run: | - echo "${{ env.EC2_SSH_KEY }}" > key.pem - chmod 600 key.pem + echo "${{ env.EC2_SSH_KEY }}" > serveraws.pem + chmod 600 serveraws.pem - name: Pull Docker image run: | - ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-13-49-244-227.eu-north-1.compute.amazonaws.com 'sudo docker pull shadi38/node-app:4.0' + ssh -o StrictHostKeyChecking=no -i serveraws.pem ubuntu@ec2-13-49-244-227.eu-north-1.compute.amazonaws.com 'sudo docker pull shadi38/node-app:4.0' - name: Stop running container run: | - ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-13-49-244-227.eu-north-1.compute.amazonaws.com 'sudo docker stop node-app:4.0 || true' - ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-13-49-244-227.eu-north-1.compute.amazonaws.com 'sudo docker rm node-app:4.0 || true' + ssh -o StrictHostKeyChecking=no -i serveraws.pem ubuntu@ec2-13-49-244-227.eu-north-1.compute.amazonaws.com 'sudo docker stop node-app:4.0 || true' + ssh -o StrictHostKeyChecking=no -i serveraws.pem ubuntu@ec2-13-49-244-227.eu-north-1.compute.amazonaws.com 'sudo docker rm node-app:4.0 || true' - name: Run new container run: | - ssh -o StrictHostKeyChecking=no -i key.pem ubuntu@ec2-13-49-244-227.eu-north-1.compute.amazonaws.com 'sudo docker run -d --name node-app -p 3000:3000 shadi38/node-app:4.0' + ssh -o StrictHostKeyChecking=no -i serveraws.pem ubuntu@ec2-13-49-244-227.eu-north-1.compute.amazonaws.com 'sudo docker run -d --name node-app -p 3000:3000 shadi38/node-app:4.0'