This commit is contained in:
@@ -11,34 +11,19 @@ jobs:
|
||||
steps:
|
||||
- name: 检出代码
|
||||
uses: actions/checkout@v4.1.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: 设置 Python 3.11
|
||||
uses: actions/setup-python@v4.7.1
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: 缓存 pip 依赖
|
||||
uses: actions/cache@v3.3.2
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('requirement.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
|
||||
- name: 安装 Python 依赖 (仅用于验证)
|
||||
run: pip install -r requirement.txt
|
||||
|
||||
- name: 准备环境变量文件
|
||||
- name: 检查 Python 环境
|
||||
run: |
|
||||
cat > .env << EOF
|
||||
ZHIPUAI_API_KEY=${{ secrets.ZHIPUAI_API_KEY }}
|
||||
VLLM_LOCAL_KEY=${{ secrets.VLLM_LOCAL_KEY }}
|
||||
EOF
|
||||
python3 --version
|
||||
pip3 --version
|
||||
|
||||
- name: 重新构建并启动前后端服务(不影响数据库)
|
||||
run: docker compose up -d --build backend frontend
|
||||
- name: 构建并启动前后端服务(环境变量注入)
|
||||
env:
|
||||
ZHIPUAI_API_KEY: ${{ secrets.ZHIPUAI_API_KEY }}
|
||||
VLLM_LOCAL_KEY: ${{ secrets.VLLM_LOCAL_KEY }}
|
||||
run: |
|
||||
export DOCKER_BUILDKIT=1
|
||||
docker compose up -d --build backend frontend
|
||||
|
||||
- name: 健康检查
|
||||
run: |
|
||||
@@ -60,4 +45,4 @@ jobs:
|
||||
run: docker system prune -f
|
||||
|
||||
- name: 显示运行状态
|
||||
run: docker compose ps
|
||||
run: docker compose ps
|
||||
Reference in New Issue
Block a user