From 20804b469f5ceb7529683bc56aa3b1024994134f Mon Sep 17 00:00:00 2001 From: Nubenetes Bot Date: Tue, 26 May 2026 01:25:43 +0200 Subject: [PATCH] fix: resolve recursive copy error in deployment workflow and bump to 2.3.1 --- .github/workflows/06.1.main.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/06.1.main.yml b/.github/workflows/06.1.main.yml index 2a6f50d1..b73a494b 100644 --- a/.github/workflows/06.1.main.yml +++ b/.github/workflows/06.1.main.yml @@ -35,18 +35,22 @@ jobs: run: | pip install -r requirements.txt - # 1. Build V1 (Root) - Preserves all legacy links for SEO - - name: Build V1 Edition - run: mkdocs build -f mkdocs.yml -d site/ + # 1. Build V1 to a temporary staging area + - name: Build V1 Edition (Staging) + run: mkdocs build -f mkdocs.yml -d site_v1_temp/ - # 2. Build V2 Elite Edition (/v2/) + # 2. Deploy V1 to Root (SEO) and /v1/ (Fallback) + - name: Deploy V1 to Root and Subdirectory + run: | + mkdir -p site/v1/ + cp -r site_v1_temp/* site/ + cp -r site_v1_temp/* site/v1/ + rm -rf site_v1_temp/ + + # 3. Build V2 Elite Edition (/v2/) - name: Build V2 Elite Edition run: mkdocs build -f v2-mkdocs.yml -d site/v2/ - # 3. Duplicate V1 to /v1/ - Provides an explicit path to the exhaustive archive - - name: Duplicate V1 to /v1/ - run: cp -r site/ site/v1/ - # 4. Inject Root Redirect to V2 - Human visitors land on V2 by default - name: Inject Root Redirect to V2 run: |