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: |