name: Deploy
on:
  push:
    branches: [main]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Print environment
        run: |
          echo "Home: $HOME"
          echo "Working dir: $(pwd)"

      - name: Manually Clone Repo
        run: |
          git clone --recursive https://git.frostdeer.com/Chewico/DeerEngine.git .

      - name: Install dependencies
        run: apt update && apt install -y uuid-dev make gcc clang libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libgtk-3-dev make gcc gdb

      - name: Generate make file
        run: |
          cd vendor/premake-core
          make -f Bootstrap.mak linux
          cd ../..
          vendor/premake-core/bin/release/premake5 gmake

      - name: Compile
        run: |
          make
