Add LLM configuration options and update deployment workflow
Some checks failed
Test & Deploy API / test (push) Failing after 1m14s
Test & Deploy API / deploy (push) Has been skipped

- Introduced new API keys for Anthropic and Google in .env.example and settings.py
- Updated llm.py to retrieve API keys directly from settings
- Modified deploy.yaml to streamline code checkout and improve deployment process
This commit is contained in:
2026-03-03 16:52:56 +01:00
parent 091787a6da
commit 314780d59a
4 changed files with 46 additions and 17 deletions

View File

@@ -3,10 +3,8 @@ run-name: ${{ gitea.ref_name }} → Docker LXC
on:
push:
branches: [main]
tags: ['v*']
pull_request:
branches: [main]
tags:
- 'v*'
jobs:
# ── 1. Run tests in an isolated Python container ──────────────────
@@ -16,8 +14,15 @@ jobs:
image: python:3.12-slim
steps:
- name: Install git
run: apt-get update && apt-get install -y --no-install-recommends git
- name: Checkout Code
uses: actions/checkout@v4
run: |
git clone --depth 1 --branch "${GITHUB_REF_NAME}" \
"http://10.0.0.119:3000/${GITHUB_REPOSITORY}.git" . || \
git clone --depth 1 "http://10.0.0.119:3000/${GITHUB_REPOSITORY}.git" . && \
git checkout "${GITHUB_SHA}"
- name: Install Dependencies
run: pip install --no-cache-dir -r requirements.txt
@@ -36,15 +41,21 @@ jobs:
steps:
- name: Checkout Code
uses: actions/checkout@v4
run: |
cd /tmp
rm -rf adiuva-api-deploy
git clone --depth 1 "http://10.0.0.119:3000/${GITHUB_REPOSITORY}.git" adiuva-api-deploy || \
git clone --depth 1 "http://10.0.0.119:3000/${GITHUB_REPOSITORY}.git" adiuva-api-deploy
cd adiuva-api-deploy && git checkout "${GITHUB_SHA}" 2>/dev/null || true
- name: Sync to deploy directory
run: |
DEPLOY_DIR="/opt/adiuva-api"
SRC="/tmp/adiuva-api-deploy"
mkdir -p "$DEPLOY_DIR"
# Sync source, preserve .env and volumes
cp -rf app/ alembic/ alembic.ini Dockerfile docker-compose.yml requirements.txt "$DEPLOY_DIR/"
cp -rf "$SRC/app/" "$SRC/alembic/" "$SRC/alembic.ini" "$SRC/Dockerfile" "$SRC/docker-compose.yml" "$SRC/requirements.txt" "$DEPLOY_DIR/"
- name: Build & restart services
run: |