name: Deploy Volleyball Dev

on:
  push:
    branches:
      - main

jobs:
  deploy:
    runs-on: docker
    steps:
      - name: Code auschecken
        uses: actions/checkout@v3

      - name: Verbinde zum Server und update Repo
        run: |
          echo "Pulling latest code..."
          cd /opt/volleyball-dev/frontend
          git pull
          echo "Restarting docker containers..."
          docker-compose -f /opt/volleyball-dev/docker-compose.yml up -d --build
