Revert "yep" #30
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 Server via SSH | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install sshpass | |
run: sudo apt-get install -y sshpass | |
- name: Test Server Reachability | |
run: ping -c 4 10.11.29.103 | |
- name: Debug SSH Connection | |
env: | |
SSH_PASSWORD: ${{ secrets.SSH_PASSWORD }} | |
run: | | |
sshpass -p "$SSH_PASSWORD" ssh -vvv -o StrictHostKeyChecking=no root@${{ secrets.SERVER_IP }} << 'EOF' | |
echo "Connected successfully" | |
EOF |