diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 35de58b..ec92ebf 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -1,4 +1,5 @@ name: Build and Deploy Notes + on: push: branches: @@ -7,22 +8,32 @@ on: jobs: build: runs-on: ubuntu-latest + steps: + # Step 1: Checkout your repo - name: Checkout code uses: actions/checkout@v4 - - name: Build with MkDocs Material - # This runs ONLY this step inside the mkdocs container - uses: docker://squidfunk/mkdocs-material:latest - with: - args: build - - - name: Deploy to Web Folder + # Step 2: Install Python + MkDocs Material + - name: Setup Python and MkDocs run: | - mkdir -p /notes - if [ -d "site" ]; then - cp -R site/* /notes/ + python3 -m pip install --upgrade pip + pip install mkdocs-material + + # Step 3: Build the static site + - name: Build site with MkDocs + run: | + if [ -f "mkdocs.yml" ]; then + mkdocs build else - echo "Error: site directory not found!" + echo "mkdocs.yml not found!" exit 1 fi + + # Step 4: Deploy to host-mounted folder + - name: Deploy to Web Folder + run: | + # Ensure target exists + mkdir -p /notes + # Copy generated site files + cp -R site/* /notes/