From a0bb47b022c6f5c4718359316f1bd7cbc5959d38 Mon Sep 17 00:00:00 2001 From: XFlow Deploy Date: Mon, 1 Jun 2026 13:02:09 +0500 Subject: [PATCH] fix(ci): use NPB-style checkout (git init + fetch) --- .gitea/workflows/deploy.yml | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index c1251e7..73ffce4 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -11,29 +11,20 @@ jobs: runs-on: ubuntu-latest container: image: node:22-alpine - options: --network bridge defaults: run: shell: sh steps: - name: Checkout - shell: sh - env: - TOKEN: ${{ secrets.GIT_TOKEN }} run: | - if ! command -v git >/dev/null 2>&1; then - if command -v apk >/dev/null 2>&1; then - apk add --no-cache git - elif command -v apt-get >/dev/null 2>&1; then - apt-get update && apt-get install -y git - else - echo "Git not found and no package manager detected" - exit 1 - fi + apk add --no-cache git + if [ ! -d ".git" ]; then + git init + git remote add origin http://oauth2:${{ secrets.GIT_TOKEN }}@git.a-crm.controlsystem.kz/AVTEX/XFlow.git fi - CLEAN_TOKEN=$(printf '%s' "${TOKEN}" | tr -d '\r\n') - git clone "http://oauth2:${CLEAN_TOKEN}@git.a-crm.controlsystem.kz/AVTEX/XFlow.git" . + git fetch origin master + git reset --hard origin/master - name: Install dependencies