name: Build and Deploy Notes on: push: branches: - main jobs: build: runs-on: ubuntu-latest # this will use your runner container steps: - name: Checkout code uses: actions/checkout@v4 - name: Setup Python and MkDocs run: | apt-get update apt-get install -y python3-pip pip3 install --upgrade pip pip3 install mkdocs-material - name: Build site with MkDocs run: | # Ensure we are in the directory containing mkdocs.yml mkdocs build --clean --site-dir ./dist - name: Deploy to host run: | # Ensure the mounted directory exists in the job container mkdir -p /host_notes # Use -L to ensure we copy actual data, not symlinks # Use -p to preserve permissions cp -RLp ./dist/* /host_notes/ # Force the host's UID/GID so 'jay' can read/write them # Replace 1000 with your actual UID if 'jay' is different chown -R 1000:1000 /host_notes/* echo "Deployment complete. Checking /host_notes:" ls -F /host_notes