Skip to content

[IMP/REF] use sructured output in the gpt4o-mini query #46

[IMP/REF] use sructured output in the gpt4o-mini query

[IMP/REF] use sructured output in the gpt4o-mini query #46

Workflow file for this run

name: SSH Deployment
on:
push:
branches: [master]
workflow_dispatch: # Allows manual triggering
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install SSH Key
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SERVER_SSH_KEY }}" > ~/.ssh/deploy_key
chmod 600 ~/.ssh/deploy_key
ssh-keyscan -H ${{ secrets.SERVER_HOST }} >> ~/.ssh/known_hosts
- name: Deploy to server
env:
HOST: ${{ secrets.SERVER_HOST }}
USER: ${{ secrets.SERVER_USER }}
SCREEN_SESSION: ${{ secrets.SCREEN_SESSION }}
REPO_PATH: ${{ secrets.REPO_PATH }}
run: |
ssh -i ~/.ssh/deploy_key -o IdentitiesOnly=yes $USER@$HOST << EOF
# Send Ctrl+C to gracefully stop the process
screen -S $SCREEN_SESSION -X stuff $'\003'
# Wait for the process to stop
sleep 2
# Pull latest changes
cd $REPO_PATH
git pull
# switch to the virtual environment
source .venv/bin/activate
# Update dependencies
pip install -r requirements.txt
# Run migrations
alembic upgrade head
# Restart the process
screen -S $SCREEN_SESSION -X stuff 'python bot.py\n'
EOF