From 21b7679b2e48469a4bcc25cd3dbaa08246c38e26 Mon Sep 17 00:00:00 2001 From: Nubenetes Bot Date: Tue, 26 May 2026 13:56:49 +0200 Subject: [PATCH] chore: recreate deployment workflow with new name and group --- .github/workflows/06.deploy_final.yml | 91 +++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 .github/workflows/06.deploy_final.yml diff --git a/.github/workflows/06.deploy_final.yml b/.github/workflows/06.deploy_final.yml new file mode 100644 index 00000000..db90b6e3 --- /dev/null +++ b/.github/workflows/06.deploy_final.yml @@ -0,0 +1,91 @@ +name: 06.1. Final Portal Deploy +on: + push: + branches: + - master + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: write + pages: write + id-token: write + +# Allow only one concurrent deployment +concurrency: + group: "pages-stable" + cancel-in-progress: false + +jobs: + build: + name: Build Dual Versions + runs-on: ubuntu-latest + steps: + - name: Checkout master + uses: actions/checkout@v4 + with: + submodules: true + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + cache: 'pip' + + - name: Install dependencies + run: | + pip install mkdocs-material mkdocs-redirects mkdocs-minify-plugin pymdown-extensions + pip install -r requirements.txt + + # 1. Build V1 to a temporary staging area + - name: Build V1 Edition (Staging) + run: mkdocs build -f mkdocs.yml -d site_v1_temp/ + + # 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/ + + # 4. Inject Root Redirect to V2 - Human visitors land on V2 by default + - name: Inject Root Redirect to V2 + run: | + cat << 'EOF' > site/index.html + + + + + Nubenetes Redirect + + + +

Redirecting to the V2 Elite Portal. Click here.

+ + + EOF + + - name: Setup Pages + uses: actions/configure-pages@v4 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: './site' + + deploy: + name: Deploy to GitHub Pages + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4