diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 6074783..94e5153 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -20,7 +20,13 @@ jobs: --health-timeout 5s --health-retries 20 steps: - - uses: https://gitea.com/actions/checkout@v4 + - name: Checkout repository + env: + REPOSITORY_URL: http://117.72.28.96:8765/Jacky/Hulumath-Web.git + REVISION: ${{ gitea.sha }} + run: | + git clone "$REPOSITORY_URL" . + git checkout --detach "$REVISION" - name: Show Python version run: python3 --version - name: Install MySQL build dependencies diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index dcc57ae..cb47264 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -28,9 +28,9 @@ jobs: --health-retries 20 steps: - name: 检出 main - uses: https://gitea.com/actions/checkout@v4 - with: - ref: main + env: + REPOSITORY_URL: http://117.72.28.96:8765/Jacky/Hulumath-Web.git + run: git clone --branch main --single-branch "$REPOSITORY_URL" . - name: 显示 Python 版本 run: python3 --version