Repository navigation
chore: 版本号升级至 v0.16.0(README / client / website 全量同步) #2
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) |