From 9b4115aafcd1f3cb704381048ac1663c0b2b880a Mon Sep 17 00:00:00 2001 From: Jay Date: Mon, 2 Mar 2026 18:21:18 +0000 Subject: [PATCH] update workflow --- .gitea/workflows/deploy.yaml | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index ce7d2ee..5a428e8 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -19,26 +19,24 @@ jobs: apt-get install -y python3-pip pip3 install --upgrade pip pip3 install mkdocs-material - - - name: Deploy to host-mounted folder - run: | - # Debug: See if the directory is actually a mount - mount | grep /notes || echo "Warning: /notes is not a mount point!" - - # Ensure we can write to it - mkdir -p /notes - - # Copy files - cp -v -R site/* /notes/ - - # List contents to verify they exist in the container context - ls -la /notes - - name: Build site with MkDocs run: | - mkdocs build + # Ensure we are in the directory containing mkdocs.yml + mkdocs build --clean --site-dir ./dist - name: Deploy to host-mounted folder run: | + # 1. Verify the build output exists + if [ ! -d "./dist" ]; then + echo "Error: Build directory ./dist does not exist!" + exit 1 + fi + + # 2. Ensure destination exists (this is the host-mounted volume) mkdir -p /notes - cp -R site/* /notes/ + + # 3. Copy contents from ./dist to /notes + cp -v -R ./dist/* /notes/ + + # 4. Sync to ensure data is written to disk + sync