Repository navigation
feat: v0.17.0 — 课堂模块组件化、课程智能检测与多模态分析增强 #5
Workflow file for this run
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 AI Gateway | |
| on: | |
| push: | |
| branches: [master] | |
| paths: ['server/**'] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build and push Docker image | |
| run: | | |
| cd server | |
| docker build -t ai-gateway:${{ github.sha }} . | |
| - name: Deploy to server | |
| uses: appleboy/ssh-action@v1 | |
| with: | |
| host: ${{ secrets.SERVER_HOST }} | |
| username: ${{ secrets.SERVER_USER }} | |
| key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| script: | | |
| cd /opt/keban | |
| docker-compose pull | |
| docker-compose up -d --force-recreate | |
| sleep 10 | |
| curl -f http://localhost:8000/health || (docker-compose rollback && exit 1) |