name: Deploy FUZ 2.0
on:
  push:
    branches:
      - main
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      
      - name: Create .env file from secret
        run: |
          echo "${{ secrets.ENV_FILE }}" > .env
      
      - name: Build and Deploy
        run: |
          docker compose -f docker-compose.prod.yml build
          docker compose -f docker-compose.prod.yml up -d --force-recreate