Skip to content

Commit

Permalink
[fix] removing temp_key for aws credentials and set server locally
Browse files Browse the repository at this point in the history
  • Loading branch information
ghkdqhrbals committed Nov 16, 2023
1 parent d50b23d commit 4f0b7a4
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,22 +117,22 @@ jobs:
NEW_VERSION: ${{ env.NEW_VERSION }}
run: |
sudo -i
echo "$PRIVATE_KEY" > temp_key.pem
chmod 600 temp_key.pem
ssh -o StrictHostKeyChecking=no -i temp_key.pem ${EC2_URL} << EOF
if [ ! -d "spring-chatting-server" ]; then
git clone https://github.com/ghkdqhrbals/spring-chatting-server.git spring-chatting-server
fi
cd spring-chatting-server
git checkout main
git reset --hard
git pull
cd k8s/onlychat/deployment
sh write_image_to_deploy.sh ${{ env.ECR_URL }} ap-northeast-2 ${NEW_VERSION}
cd ..
kubectl apply -f ./volume/
kubectl apply -f ./namespace/
kubectl apply -f ./service/
kubectl apply -f ./deployment/
EOF
rm temp_key.pem
# echo "$PRIVATE_KEY" > temp_key.pem
# chmod 600 temp_key.pem
# ssh -o StrictHostKeyChecking=no -i temp_key.pem ${EC2_URL} << EOF
if [ ! -d "spring-chatting-server" ]; then
git clone https://github.com/ghkdqhrbals/spring-chatting-server.git spring-chatting-server
fi
cd spring-chatting-server
git checkout main
git reset --hard
git pull
cd k8s/onlychat/deployment
sh write_image_to_deploy.sh ${{ env.ECR_URL }} ap-northeast-2 ${NEW_VERSION}
cd ..
kubectl apply -f ./volume/
kubectl apply -f ./namespace/
kubectl apply -f ./service/
kubectl apply -f ./deployment/
# EOF
# rm temp_key.pem

0 comments on commit 4f0b7a4

Please sign in to comment.