name: Deploy

on:
  push:
    branches:
      - main

jobs:
  deploy:
    runs-on: vps-host
    steps:
      - name: Deploy
        run: |
          set -e
          cd ${{ secrets.APP_DIR }}

          git pull origin main

          python3 -m pip install -r requirements.txt --quiet

          npx tailwindcss \
            -i static/src/app.css \
            -o static/css/app.css \
            --minify

          sudo systemctl restart benny
