chore(workflow): adding more secrets + variables for deplotment
All checks were successful
/ build (push) Successful in 2m38s
/ deploy (push) Successful in 1m49s

This commit is contained in:
devaine 2026-05-11 17:52:16 -05:00
commit 19d6ac7f6e
Signed by: devaine
GPG key ID: 954B1DCAC6FF84EE
4 changed files with 9 additions and 3 deletions

View file

@ -77,6 +77,9 @@ jobs:
- name: Write secrets in an .env file
run: |
echo ${{ secrets.API_PORT }} >> .env
echo ${{ secrets.FRONTEND_PORT }} >> .env
echo ${{ secrets.AI_API_KEY }} >> .env
- name: Setup remote connection and deploy container.
env:

View file

@ -5,7 +5,7 @@ import os
# Load environment variables (from run.sh)
load_dotenv()
GEMINI_KEY = os.getenv("GEMINI_KEY")
GEMINI_KEY = os.getenv("AI_API_KEY")
# gemini stuff
client = genai.Client(api_key=GEMINI_KEY)

View file

@ -3,10 +3,12 @@ services:
command: "web"
image: git.devdoes.work/devaine/fbla-cs-competition:app
ports:
- 3000:3000
- ${FRONTEND_PORT}:3000
api:
command: "api"
image: git.devdoes.work/devaine/fbla-cs-competition:app
environment:
AI_API_KEY: ${AI_API_KEY}
ports:
- 8000:8000
- ${API_PORT}:8000

View file

@ -4,5 +4,6 @@ echo "$@"
if [[ $1 == "web" ]]; then
cd ./frontend/ && npm run start
elif [[ $1 == "api" ]]; then
export | grep "AI_API_KEY" >>./api/.env
cd ./api/src && source ../venv/bin/activate && fastapi run
fi