This commit is contained in:
@@ -42,12 +42,13 @@ jobs:
|
|||||||
# --- 以下为在管理机上执行的脚本 ---
|
# --- 以下为在管理机上执行的脚本 ---
|
||||||
|
|
||||||
# 定义项目目录(管理机上的代码存放路径)
|
# 定义项目目录(管理机上的代码存放路径)
|
||||||
PROJECT_DIR="/home/bmygitea_actions"
|
PROJECT_DIR="/home/bmy"
|
||||||
|
|
||||||
# 进入项目目录,若不存在则克隆仓库
|
# 进入项目目录,若不存在则克隆仓库
|
||||||
if [ ! -d "$PROJECT_DIR" ]; then
|
if [ ! -d "$PROJECT_DIR" ]; then
|
||||||
echo "项目目录不存在,克隆仓库..."
|
echo "项目目录不存在,克隆仓库..."
|
||||||
# 假设管理机已配置好 Gitea 的访问权限 (如部署密钥)
|
# 假设管理机已配置好 Gitea 的访问权限 (如部署密钥)
|
||||||
|
# git@git.bmycode.help:bmy/gitea_actions.git
|
||||||
git clone git@git.bmycode.help:${{ gitea.repository }}.git $PROJECT_DIR
|
git clone git@git.bmycode.help:${{ gitea.repository }}.git $PROJECT_DIR
|
||||||
cd $PROJECT_DIR
|
cd $PROJECT_DIR
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user