diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index cca76f9..0f9fba5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -7,12 +7,39 @@ on: paths: - 'server/**' - 'docker-compose.cloud.yml' - - 'startup.sh' + - '.github/workflows/deploy.yml' + pull_request: + branches: + - main + paths: + - 'server/**' - '.github/workflows/deploy.yml' jobs: + test-build: + name: Server Build Check + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '24' + cache: 'npm' + cache-dependency-path: server/package-lock.json + + - name: Install Dependencies + run: cd server && npm ci + + - name: Build Server + run: cd server && npm run build + deploy: name: Deploy API to Compute Engine + if: github.event_name == 'push' && github.ref == 'refs/heads/main' runs-on: ubuntu-latest environment: name: production diff --git a/.gitignore b/.gitignore index 85bdb1c..87c88ab 100644 --- a/.gitignore +++ b/.gitignore @@ -52,4 +52,7 @@ qdrant_data/ _agents/ _agent/ brain/ -server.tar \ No newline at end of file +# Archives +*.tar +*.zip +*.gz \ No newline at end of file