register with password,login and logout API (#21) (#22) #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to Wallet DEV | |
on: [push] | |
jobs: | |
Deploy: | |
name: Deploy to DEV | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Deploy to DEV | |
uses: easingthemes/ssh-deploy@main | |
env: | |
SSH_PRIVATE_KEY: ${{ secrets.EC2_SSH_KEY_DEV }} | |
REMOTE_HOST: ${{ secrets.HOST_DNS_DEV }} | |
REMOTE_USER: ${{ secrets.USERNAME_DEV }} | |
- name: Set up SSH key | |
run: | | |
mkdir -p ~/.ssh | |
echo "${{ secrets.EC2_SSH_KEY_DEV }}" > ~/.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_DEV }} >> ~/.ssh/known_hosts | |
sudo apt-get install sshpass | |
- name: Deploy to server | |
run: | | |
sshpass -p '${{ secrets.EC2_SSH_KEY_DEV }}' ssh -v -o StrictHostKeyChecking=no ${{ secrets.USERNAME_DEV }}@${{ secrets.HOST_DNS_DEV }} <<'ENDSSH' | |
cd ${{ secrets.TARGET_DIR_DEV }} | |
./deploy.sh | |
ENDSSH |