name: Sent archive to server

on:
  push:
    branches: [ dev ]
  pull_request:
    branches: [ dev ]


jobs:
  build-and-deploy:
    runs-on: ubuntu-22.04
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        
      - name: ZIP SFTP Upload
        uses: sahil-io/release-upload-sftp@4.2
        with:
          package_name: 'instant_uploader'
          username: 'runcloud'
          server: ${{ secrets.SERVER_IP }}
          port: 22
          ssh_private_key: ${{ secrets.SSH_KEY }}
          local_path: './*'
          remote_path: ${{ secrets.REMOTE_PATH}}
