feat:更新代码
All checks were successful
Deploy Lighttpd Admin / deploy (push) Successful in 4m53s

This commit is contained in:
leilei
2026-01-14 17:12:04 +08:00
parent f684fd49fb
commit 4fadded872
86 changed files with 27 additions and 609 deletions

View File

@@ -1,4 +1,4 @@
name: Deploy To Dev
name: Deploy Lighttpd Admin
on:
push:
@@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-22.04
container:
volumes:
- /app/lighttpd-content:/app/xsy-www
- /app/lighttpd-admin:/app/xsy-admin
steps:
- name: Checkout code
@@ -26,15 +26,15 @@ jobs:
# 如果目录不存在,报错并退出当前步骤
exit 1
fi
ls -lha /app/xsy-www/
rm -rf /app/xsy-www/*
cp -r ./dist/* /app/xsy-www/
ls -lha /app/xsy-admin/
rm -rf /app/xsy-admin/*
cp -r ./dist/* /app/xsy-admin/
- name: Find and restart the app container
run: |
# 1. 使用 docker ps 过滤包含 'xsy-lighttpd' 服务的容器
# 1. 使用 docker ps 过滤包含 'xsy-admin' 服务的容器
# 2. 提取容器 ID 或名称
CONTAINER_ID=$(docker ps -a --filter "name=xsy-lighttpd" --format "{{.ID}}")
CONTAINER_ID=$(docker ps -a --filter "name=xsy-admin" --format "{{.ID}}")
if [ -z "$CONTAINER_ID" ]; then
echo "Error: Could not find any container matching name 'app1'."