From e5db7511c63d8facadbd9fbf8992f3aa89456aa1 Mon Sep 17 00:00:00 2001 From: admin Date: Sat, 18 Apr 2026 08:32:29 +0700 Subject: [PATCH] fix(ci): use SSH checkout directly (no HTTPS fallback) - SSH port 2222 is proven to work from push tests - Simpler and faster than HTTPS with timeout fallback --- .gitea/workflows/ci-deploy.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.gitea/workflows/ci-deploy.yml b/.gitea/workflows/ci-deploy.yml index c495da4..4176168 100644 --- a/.gitea/workflows/ci-deploy.yml +++ b/.gitea/workflows/ci-deploy.yml @@ -14,19 +14,13 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 15 steps: - - name: Checkout (SSH fallback for HTTPS timeout) + - name: Checkout (SSH) run: | - # Try HTTPS first with timeout - if timeout 30 git clone --depth 1 https://git.np-dms.work/np-dms/lcbp3.git . 2>/dev/null; then - echo "HTTPS checkout successful" - else - echo "HTTPS failed, using SSH fallback" - mkdir -p ~/.ssh - echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - ssh-keyscan -p 2222 git.np-dms.work >> ~/.ssh/known_hosts - git clone --depth 1 ssh://git@git.np-dms.work:2222/np-dms/lcbp3.git . - fi + mkdir -p ~/.ssh + echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa + ssh-keyscan -p 2222 git.np-dms.work >> ~/.ssh/known_hosts + git clone --depth 1 ssh://git@git.np-dms.work:2222/np-dms/lcbp3.git . git fetch origin main git reset --hard origin/main