feat:更新进入房间方式
This commit is contained in:
@@ -1,43 +0,0 @@
|
|||||||
name: Deploy To Dev
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- 'dev'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
deploy:
|
|
||||||
runs-on: gx-dev01
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Copy specific directory to runner's host machine
|
|
||||||
run: |
|
|
||||||
TARGET_DIR="./dist"
|
|
||||||
|
|
||||||
# 检查 dist 目录是否存在
|
|
||||||
if [ ! -d "$TARGET_DIR" ]; then
|
|
||||||
echo "Error: The source directory '$TARGET_DIR' does not exist in the repository."
|
|
||||||
# 如果目录不存在,报错并退出当前步骤
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
cp -r ./dist/* /data/xsy-www/
|
|
||||||
|
|
||||||
- name: Find and restart the app container
|
|
||||||
run: |
|
|
||||||
# 1. 使用 docker ps 过滤包含 'xsy-lighttpd' 服务的容器
|
|
||||||
# 2. 提取容器 ID 或名称
|
|
||||||
CONTAINER_ID=$(docker ps -a --filter "name=xsy-lighttpd" --format "{{.ID}}")
|
|
||||||
|
|
||||||
if [ -z "$CONTAINER_ID" ]; then
|
|
||||||
echo "Error: Could not find any container matching name 'app1'."
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
echo "Found container ID: $CONTAINER_ID. Restarting..."
|
|
||||||
# 使用标准的 docker restart 命令
|
|
||||||
docker restart "$CONTAINER_ID"
|
|
||||||
echo "Container restarted successfully."
|
|
||||||
fi
|
|
||||||
|
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -9,6 +9,7 @@ lerna-debug.log*
|
|||||||
|
|
||||||
node_modules
|
node_modules
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
dist
|
||||||
dist-ssr
|
dist-ssr
|
||||||
coverage
|
coverage
|
||||||
*.local
|
*.local
|
||||||
|
|||||||
Reference in New Issue
Block a user