Skip to content

Merge pull request #42 from wdjopa/fredchess-branch #23

Merge pull request #42 from wdjopa/fredchess-branch

Merge pull request #42 from wdjopa/fredchess-branch #23

Workflow file for this run

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'"