fix: pin staging compose selectors

This commit is contained in:
Jesse_Chen
2026-07-20 16:43:08 +08:00
parent 26373d257b
commit 801666a6c7
5 changed files with 39 additions and 6 deletions
@@ -347,7 +347,7 @@ jobs:
-e "$RSYNC_SSH" \
./ "$DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_PATH/"
ssh $SSH_OPTIONS "$DEPLOY_USER@$DEPLOY_HOST" \
"cd '$DEPLOY_PATH' && bash deploy/validate-staging-env.sh .env.staging && docker compose --env-file .env.staging -f deploy/docker-compose.server.yml config --quiet && GITHUB_SHA='$DEPLOY_GIT_SHA' docker compose --env-file .env.staging -f deploy/docker-compose.server.yml up -d --build --remove-orphans"
"cd '$DEPLOY_PATH' && bash deploy/validate-staging-env.sh .env.staging && APP_ENV_FILE='../.env.staging' CADDYFILE_PATH='./Caddyfile.staging' SITE_ADDRESS='https://staging.jyotisha.chat' docker compose --env-file .env.staging -f deploy/docker-compose.server.yml config --quiet && APP_ENV_FILE='../.env.staging' CADDYFILE_PATH='./Caddyfile.staging' SITE_ADDRESS='https://staging.jyotisha.chat' GITHUB_SHA='$DEPLOY_GIT_SHA' docker compose --env-file .env.staging -f deploy/docker-compose.server.yml up -d --build --remove-orphans"
- name: Verify staging
env:
@@ -71,7 +71,7 @@ push staging
-> checkout 已测试 SHA
-> 记录旧 SHA 和镜像 ID
-> rsync 到 /opt/jyotisha-staging(排除所有 .env*
-> 校验 .env.staging 权限、固定选择器和 Compose 配置
-> 校验 .env.staging 权限、固定选择器和 Compose 配置,并在 Compose 进程上显式钉死 staging 选择器
-> docker compose build/up
-> login、401 account、Python health smoke tests
-> 记录部署 SHA