Skip to content

Commit

Permalink
build: connection changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AshishBarvaliya committed Nov 23, 2023
1 parent 9d1ec94 commit fc291dd
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/ec2-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@ jobs:
USERNAME: ${{ secrets.USERNAME }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
run: |
echo "$SSH_PRIVATE_KEY" > private_key && chmod 600 private_key
ssh -o StrictHostKeyChecking=no -i private_key ${USERNAME}@${HOST} '
mkdir -p ~/.ssh
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H "$HOST" >> ~/.ssh/known_hosts
ssh -o StrictHostKeyChecking=no $USERNAME@$HOST << EOF
source ~/.nvm/nvm.sh
node -v
cd ~/frappe-bench/apps/erpnext
git pull
Expand All @@ -30,4 +35,4 @@ jobs:
sudo kill -9 \$(sudo lsof -t -i:13000)
screen
bench start
'
EOF

0 comments on commit fc291dd

Please sign in to comment.