From 47184a2f25f7029c86546a5b9600fa46855a4e80 Mon Sep 17 00:00:00 2001 From: kjh2064 Date: Mon, 22 Jun 2026 01:38:11 +0900 Subject: [PATCH] WBS-7.9: trim CI cache-hit overhead and wait for deploy readiness --- .gitea/workflows/ci.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 2d1bc1c..aa99bb3 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -5,6 +5,7 @@ on: branches: [ main ] pull_request: branches: [ main ] + workflow_dispatch: # ───────────────────────────────────────────────────────────────── # Synology DS216j (ARMv7l 32-bit) 환경 제약 @@ -70,8 +71,13 @@ jobs: ls -dt "$VENV_BASE"/*/ 2>/dev/null | tail -n +3 | xargs rm -rf 2>/dev/null || true else echo "=== venv 캐시 히트: $("$VENV/bin/python" --version 2>&1) ===" + "$VENV/bin/python" - <<'PY' + import importlib + for mod in ("requests", "yaml", "openpyxl"): + importlib.import_module(mod) + print("venv dependency import check: PASS") + PY fi - "$VENV/bin/pip" install requests pyyaml openpyxl --quiet echo "$VENV/bin" >> $GITHUB_PATH - name: Install Node Dependencies @@ -84,9 +90,15 @@ jobs: if [ -d "$CACHE_DIR/node_modules" ]; then echo "=== node_modules 캐시 히트: $LOCK_HASH ===" - # 캐시에서 심볼릭 링크로 연결 (복사 대신 즉시) - rm -rf node_modules - ln -s "$CACHE_DIR/node_modules" node_modules + # 이미 같은 캐시를 가리키고 있으면 재연결하지 않음 + if [ -L node_modules ] && [ "$(readlink node_modules)" = "$CACHE_DIR/node_modules" ]; then + echo "=== node_modules already linked to cache ===" + else + if [ -e node_modules ] || [ -L node_modules ]; then + rm -rf node_modules + fi + ln -s "$CACHE_DIR/node_modules" node_modules + fi else echo "=== npm install (최초 or lock 변경) ===" npm install --quiet