Files
socweb/.github/workflows/deploy-backend.yml
T
gongzhiyongandClaude Opus 4.6 efb3c53623 feat: add backend service and Azure deployment workflow
- Add complete Python backend (Litestar + LangGraph) with chat, conversations, tickets APIs
- Add GitHub Actions workflow for auto-deploying backend to Azure Web App (soc-backend)
- Add gunicorn to requirements.txt for production serving
- Update CLAUDE.md and EXTERNAL_SERVICES.md with latest config
- Remove obsolete claudehd.md (merged into gpthd.md)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 13:31:00 +08:00

36 lines
878 B
YAML

name: Deploy Backend to Azure
on:
push:
branches: [main]
paths:
- "backend/**"
- ".github/workflows/deploy-backend.yml"
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Create deployment package
run: |
cd backend
pip install -r requirements.txt --target=".python_packages/lib/site-packages"
zip -r ../deploy.zip . -x "*.pyc" "__pycache__/*" ".venv/*" ".env"
- name: Deploy to Azure Web App
uses: azure/webapps-deploy@v3
with:
app-name: soc-backend
publish-profile: ${{ secrets.AZURE_BACKEND_PUBLISH_PROFILE }}
package: deploy.zip