From 3d61deefd33e8d17d824623e79fe78ead3bed3bd Mon Sep 17 00:00:00 2001 From: Jacky Date: Tue, 29 Sep 2026 00:16:33 +0800 Subject: [PATCH] ci: authenticate production checkout --- .gitea/workflows/deploy.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 59c503f..2cd1063 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -19,8 +19,14 @@ jobs: steps: - name: 检出 main env: - REPOSITORY_URL: http://117.72.28.96:8765/Jacky/Hulumath-Web.git - run: git clone --branch main --single-branch "$REPOSITORY_URL" . + CHECKOUT_TOKEN: ${{ github.token }} + run: | + set -euo pipefail + git init . + git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" + git -c http.extraHeader="Authorization: token ${CHECKOUT_TOKEN}" \ + fetch --depth=1 origin main + git checkout --detach FETCH_HEAD - name: 检查发布文件和脚本语法 run: | -- 2.54.0