This commit is contained in:
parent
e13591cdfa
commit
50d6249795
|
|
@ -18,36 +18,9 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Manual checkout with SSH
|
- name: Checkout code
|
||||||
run: |
|
uses: actions/checkout@v4
|
||||||
echo "=== 配置 SSH ==="
|
|
||||||
mkdir -p ~/.ssh
|
|
||||||
chmod 700 ~/.ssh
|
|
||||||
|
|
||||||
# 添加 SSH 私钥
|
|
||||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
|
|
||||||
chmod 600 ~/.ssh/id_rsa
|
|
||||||
|
|
||||||
# 添加服务器公钥到 known_hosts
|
|
||||||
ssh-keyscan -p 22 gitea.bot.leisuretimedock.top >> ~/.ssh/known_hosts 2>/dev/null
|
|
||||||
|
|
||||||
# 配置 Git 使用 SSH
|
|
||||||
git config --global url."git@gitea.bot.leisuretimedock.top:".insteadOf "https://gitea.bot.leisuretimedock.top/"
|
|
||||||
|
|
||||||
echo "=== 克隆仓库(SSH 方式)==="
|
|
||||||
GIT_SSH_COMMAND="ssh -v" git clone --depth 1 \
|
|
||||||
git@gitea.bot.leisuretimedock.top:R3944Realms/LTDV10.git \
|
|
||||||
temp_repo
|
|
||||||
|
|
||||||
echo "=== 移动文件 ==="
|
|
||||||
shopt -s dotglob
|
|
||||||
mv temp_repo/* . 2>/dev/null || true
|
|
||||||
mv temp_repo/.[!.]* . 2>/dev/null || true
|
|
||||||
rm -rf temp_repo
|
|
||||||
|
|
||||||
echo "=== 验证 ==="
|
|
||||||
ls -la
|
|
||||||
|
|
||||||
- name: Set executable permissions
|
- name: Set executable permissions
|
||||||
run: |
|
run: |
|
||||||
echo "=== 设置文件执行权限 ==="
|
echo "=== 设置文件执行权限 ==="
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user