Skip to content

Merge pull request #9 from tekdi/v0.1.4 #5

Merge pull request #9 from tekdi/v0.1.4

Merge pull request #9 from tekdi/v0.1.4 #5

Workflow file for this run

name: Deploy to Wallet UAT
on:
push:
branches:
- main
jobs:
Deploy:
name: Deploy to UAT
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Deploy to UAT
uses: easingthemes/ssh-deploy@main
env:
SSH_PRIVATE_KEY: ${{ secrets.EC2_SSH_KEY_UAT }}
REMOTE_HOST: ${{ secrets.HOST_DNS_UAT }}
REMOTE_USER: ${{ secrets.USERNAME_UAT }}
- name: Set up SSH key
run: |
mkdir -p ~/.ssh
echo "${{ secrets.EC2_SSH_KEY_UAT }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
# Add the SSH key to the known_hosts file (replace hostname with your actual hostname)
ssh-keyscan -H ${{ secrets.HOST_DNS_UAT }} >> ~/.ssh/known_hosts
sudo apt-get install sshpass
- name: Deploy to server
run: |
sshpass -p '${{ secrets.EC2_SSH_KEY_UAT }}' ssh -v -o StrictHostKeyChecking=no ${{ secrets.USERNAME_UAT }}@${{ secrets.HOST_DNS_UAT }} <<'ENDSSH'
cd ${{ secrets.TARGET_DIR_UAT }}
./deploy.sh
ENDSSH