Development server deployment #88
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: edwiser-development-actions | |
run-name: Development server deployment | |
on: [push] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client git -y )' | |
- run: mkdir -p ~/.ssh | |
- run: echo '${{ secrets.SSH_KEY }}' | tr -d '\r' > ~/.ssh/id_rsa | |
- run: chmod 600 ~/.ssh/id_rsa | |
- run: eval `ssh-agent -s` && ssh-add ~/.ssh/id_rsa | |
- run: ssh-keyscan "${{ vars.DEV_SITE_ADDRESS }}" >> ~/.ssh/known_hosts | |
- run: which rsync || (apt update -y && apt install rsync -y) | |
- run: rsync -rvz --no-perms --exclude=".github" --exclude="vscode.code-workspace" --rsync-path="sudo rsync" --chown=dev-wdmreports:www-data --ignore-missing-args --rsh='ssh ubuntu@"${{ vars.DEV_SITE_ADDRESS }}" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' . :"/var/www/dev-bridge/public_html/wp-content/plugins" |