name: Deploy AI Brain on: push: branches: - healer-core - main jobs: build-and-deploy: runs-on: ubuntu-latest steps: - name: Checkout repo uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 with: python-version: "3.13" - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r requirements.txt - name: Heal scripts run: | sudo apt-get update && sudo apt-get install -y dos2unix find . -type f -name "*.sh" -exec dos2unix {} \; -exec chmod +x {} \; python3 -m compileall . - name: Copy installer to sync directory run: | mkdir sync cp ./install.sh sync/ - name: Build Docker image run: | docker build -t ghcr.io/${{ github.repository }}/ai-brain:latest . - name: Log in to GitHub Container Registry (GHCR) using PAT run: | echo "Logging into GitHub Container Registry (GHCR)..." echo ${{ secrets.GITHUB_PAT }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin - name: Push Docker image to GHCR run: | docker push ghcr.io/${{ github.repository }}/ai-brain:latest