Merge pull request #50 from Xcceleran-do/master #9
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 Production | |
on: | |
push: | |
branches: | |
- production | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
- name: Set up SSH | |
uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.ESUBALEW_MAC_SSH_PRIVATE_KEY }} # Access SSH key from secrets. | |
- name: Test SSH Connection to Jump Server | |
run: | | |
ssh -o StrictHostKeyChecking=no esubalew@${{ secrets.JUMP_SERVER_IP }} "echo 'Connected to Jump Server!'" | |
- name: Test SSH Connection to Target Server via Jump Server | |
run: | | |
ssh -o "ProxyJump esubalew@${{ secrets.JUMP_SERVER_IP }}" -o StrictHostKeyChecking=no esubalew@${{ secrets.WORDPRESS_PRODUCTION_SERVER_IP }} "echo 'Connected to Target Server!'" | |
- name: List Files for Debugging | |
run: ls -R ./ | |
- name: Sync Files to Target Server via Jump Server | |
run: | | |
scp -J esubalew@${{ secrets.JUMP_SERVER_IP }} -r * esubalew@${{ secrets.WORDPRESS_PRODUCTION_SERVER_IP }}:/testwp/mailing/ |