From 4ba1f4be217dda08ae75bc396cf7840e9ac1e4cc Mon Sep 17 00:00:00 2001 From: Jay Date: Tue, 3 Mar 2026 11:19:06 +0000 Subject: [PATCH] rename --- .gitea/workflows/deploy.yaml | 43 ++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 148535b..44452ec 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -8,13 +8,31 @@ jobs: build: runs-on: ubuntu-latest container: - image: node:20-bookworm + image: node:20-bookworm # Node for checkout steps: # 1️⃣ Checkout repository - uses: actions/checkout@v4 - # 2️⃣ Install Docker CLI in container + # 2️⃣ Install Python for MkDocs build + - name: Install Python + run: | + apt-get update + apt-get install -y python3 python3-venv python3-pip + + # 3️⃣ List repo files (debug) + - name: List repo files + run: ls -R "${{ github.workspace }}" + + # 4️⃣ Build MkDocs site locally + - name: Build MkDocs site + run: | + python3 -m venv .venv + .venv/bin/pip install --upgrade pip + .venv/bin/pip install -r ci/mkdocs/requirements.txt + .venv/bin/mkdocs build --clean --site-dir site_output + + # 5️⃣ Install Docker CLI so we can copy to volume - name: Install Docker CLI run: | apt-get update @@ -29,18 +47,15 @@ jobs: apt-get update apt-get install -y docker-ce-cli - - name: List repo files - run: ls -R "${{ github.workspace }}" - - # 3️⃣ Build MkDocs into Docker volume - - name: Build MkDocs into notes_public volume + # 6️⃣ Copy the site output into notes_public Docker volume + - name: Copy site to notes_public volume run: | docker run --rm \ -v notes_public:/public \ - -v "${{ github.workspace }}:/work" \ - -w /work \ - python:3.13-slim \ - sh -c "python3 -m venv .venv && \ - .venv/bin/pip install --upgrade pip && \ - .venv/bin/pip install -r ci/mkdocs/requirements.txt && \ - .venv/bin/mkdocs build --clean --site-dir /public" + -v "${{ github.workspace }}/site_output:/tmp/site" \ + alpine sh -c "cp -r /tmp/site/* /public/" + + # 7️⃣ Optional: Verify files in volume + - name: List notes_public volume + run: | + docker run --rm -v notes_public:/data alpine ls -la /data