name: Deploy Zou to staging environment

on:
  push:
    branches:
      - master

jobs:
  build:
    name: Build
    runs-on: ubuntu-latest
    steps:
    - name: Update Zou on staging server
      uses: appleboy/ssh-action@master
      with:
       host: ${{ secrets.HOST }}
       username: ${{ secrets.USERNAME }}
       key: ${{ secrets.KEY }}
       port: ${{ secrets.PORT }}
       script_stop: true
       script: |
         cd /opt/zou
         . zouenv/bin/activate
         source /etc/zou/zou.env
         pip install --upgrade git+https://github.com/cgwire/zou.git
         zou upgrade_db
         sudo service zou restart

name: Deploy Zou to staging environment

on:
  push:
    branches:
      - master

jobs:
  build:
    name: Build
    runs-on: ubuntu-latest
    steps:
    - name: Update Zou on staging server
      uses: appleboy/ssh-action@v0.1.4
      with:
       host: ${{ secrets.HOST }}
       username: ${{ secrets.USERNAME }}
       key: ${{ secrets.KEY }}
       port: ${{ secrets.PORT }}
       script_stop: true
       script: |
         cd /opt/zou
         source /etc/zou/zou.env
         sudo /opt/zou/zouenv/bin/pip install --upgrade git+https://github.com/cgwire/zou.git
         sudo -E -u zou /opt/zou/zouenv/bin/zou upgrade-db
         sudo systemctl restart zou zou-events zou-jobs

Fix github action for staging deployement
Fix github action for staging deployement
