Merge pull request #45 from wdjopa/fredchess-branch #26
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 | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
ref: master | |
- name: Set up Docker | |
uses: docker/setup-buildx-action@v1 | |
- name: Set up SSH | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y openssh-client | |
mkdir -p ~/.ssh/ | |
echo "${{ secrets.SSH_ONOH }}" | tr -d '\r' > ~/.ssh/id_rsa | |
chmod 600 ~/.ssh/id_rsa | |
eval "$(ssh-agent -s)" | |
ssh-add ~/.ssh/id_rsa | |
- name: Deploy to server | |
run: | | |
ssh -o StrictHostKeyChecking=no [email protected] -p1805 "\ | |
echo '${{ secrets.SUDO_PASSWORD }}' | sudo -S bash -c 'cd /var/www/onenation_oneheart && git checkout master && git pull origin master && php artisan migrate && exit'" |