[FIX] 채팅 속도 및 draft 개선 (#49) #86
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy to Dev Server | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| env: | |
| DOCKER_IMAGE: logit-server | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Deploy to server via SSH | |
| uses: appleboy/[email protected] | |
| with: | |
| host: ${{ secrets.DEV_SERVER_HOST }} | |
| username: ${{ secrets.DEV_SERVER_USER }} | |
| key: ${{ secrets.DEV_SERVER_SSH_KEY }} | |
| port: ${{ secrets.DEV_SERVER_PORT || 22 }} | |
| script: | | |
| cd ${{ secrets.DEV_APP_PATH }} | |
| # Pull latest code | |
| git pull origin dev | |
| # Stop existing containers | |
| docker compose -f docker-compose.dev.yml down | |
| # Rebuild and start containers | |
| docker compose -f docker-compose.dev.yml up -d --build | |
| # Wait for services to be ready | |
| sleep 15 | |
| # Run migrations | |
| docker compose -f docker-compose.dev.yml exec -T app alembic upgrade head | |
| # Create dev user if not exists | |
| docker compose -f docker-compose.dev.yml exec -T app python scripts/create_dev_user.py || true | |
| # Cleanup old images | |
| docker image prune -f | |
| echo "✅ Deployment completed!" | |
| - name: Health check | |
| uses: appleboy/[email protected] | |
| with: | |
| host: ${{ secrets.DEV_SERVER_HOST }} | |
| username: ${{ secrets.DEV_SERVER_USER }} | |
| key: ${{ secrets.DEV_SERVER_SSH_KEY }} | |
| port: ${{ secrets.DEV_SERVER_PORT || 22 }} | |
| script: | | |
| sleep 10 | |
| cd ${{ secrets.DEV_APP_PATH }} | |
| docker compose -f docker-compose.dev.yml ps --status running | grep -q "logit-fastapi" || exit 1 | |
| echo "✅ Health check passed!" |