# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: deploy

on:
  push:
    branches: [ master ]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Transfer latest to remote
        uses: appleboy/scp-action@master
        with:
          host: ${{ secrets.REMOTE_HOST }}
          username: ${{ secrets.REMOTE_USER }}
          password: ${{ secrets.REMOTE_PASSWD }}
          port: ${{ secrets.REMOTE_PORT }}
          source: "otherdave/*, data/*, conf.yaml, requirements.txt, setup.py"
          target: "otherdave"
      - name: Restart service
        uses: appleboy/ssh-action@master
        with:
          host: ${{ secrets.REMOTE_HOST }}
          username: ${{ secrets.REMOTE_USER }}
          password: ${{ secrets.REMOTE_PASSWD }}
          port: ${{ secrets.REMOTE_PORT }}
          script: systemctl restart otherdave

Add file to update remote
Add file to update remote

Push latest to remote and restart the service