chore: build and deploy web-antd
All checks were successful
Web UI CI/CD / build-and-deploy (push) Successful in 8s

This commit is contained in:
lzh
2025-12-23 14:09:26 +08:00
parent b34973ca92
commit e508bd692d
4 changed files with 124 additions and 4 deletions

View File

@@ -108,6 +108,32 @@ jobs:
--restart always \
-p ${HOST_PORT}:80 \
"${IMAGE_NAME}:latest"
# 等待容器启动
echo "Waiting for container to start..."
sleep 3
# 检查容器状态
CONTAINER_STATUS=$(docker ps -a --filter "name=$CONTAINER_NAME" --format "{{.Status}}" | head -1)
if [ -z "$CONTAINER_STATUS" ]; then
echo "❌ Error: Container failed to start"
exit 1
fi
# 检查容器是否正在运行
if docker ps --filter "name=$CONTAINER_NAME" --format "{{.Names}}" | grep -q "$CONTAINER_NAME"; then
echo "✅ Container is running"
else
echo "❌ Error: Container is not running"
echo "Container status: $CONTAINER_STATUS"
echo "Container logs:"
docker logs $CONTAINER_NAME --tail 50
exit 1
fi
# 显示容器信息
echo "Container info:"
docker ps --filter "name=$CONTAINER_NAME" --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"
echo "✅ Deployment Successful! Access at port ${HOST_PORT}"