Merge pull request #71 from Mahmoud-nfz/dev #6
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 via SSH with Password | |
on: | |
push: | |
branches: | |
- prod | |
pull_request: | |
branches: | |
- prod | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install SSH Pass | |
run: sudo apt-get install -y sshpass | |
- name: SSH and Run Script | |
run: | | |
sshpass -p ${{ secrets.SSH_PASSWORD }} ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_IP }} "bash /home/${{ secrets.SSH_USERNAME }}/redeploy.sh" |