name: update server
run-name: Update locally hosted server
on: [push]
jobs:
  update:
    runs-on: ubuntu-latest
    steps:
    - name: SSH
      uses: appleboy/ssh-action@v1.1.0
      with:
        host: ${{ secrets.SERVER_HOST }}
        username: ${{ secrets.SERVER_USERNAME }}
        password: ${{ secrets.SERVER_PASSWORD }}
        port: 22
        script: |
          cd /var/www
          ./build_site.sh
