From 9835d9129a32b19236b724d78c3a0485b510db7c Mon Sep 17 00:00:00 2001 From: xtheeq Date: Thu, 9 Jul 2026 19:40:53 +0530 Subject: [PATCH] ci: add docs/patches overlay for versioned docs --- .github/workflows/sync-website.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sync-website.yml b/.github/workflows/sync-website.yml index b3c10af0..b8176738 100644 --- a/.github/workflows/sync-website.yml +++ b/.github/workflows/sync-website.yml @@ -36,16 +36,21 @@ jobs: rm -rf "$TARGET" mkdir -p "$TARGET" - # Copy current docs as "(git)" + # Copy current docs as "(git)", excluding patches dir cp -r docs "$TARGET/(git)" + rm -rf "$TARGET/(git)/patches" # Generate versioned docs from last 2 semver tags tags=$(git tag --sort=-v:refname | grep '^v\?[0-9]\+\.[0-9]\+\.[0-9]\+$' | head -2) for tag in $tags; do + name="v${tag#v}" git worktree add /tmp/docs-"$tag" "$tag" || continue if [ -d "/tmp/docs-$tag/docs" ]; then - name="v${tag#v}" cp -r "/tmp/docs-$tag/docs" "$TARGET/$name" + # Overlay any patches for this version + if [ -d "docs/patches/$name" ]; then + cp -r "docs/patches/$name"/* "$TARGET/$name/" + fi jq --arg title "$name" --arg desc "$name release" \ '.title = $title | .description = $desc | .root = true' \ "$TARGET/$name/meta.json" > "$TARGET/$name/meta.json.tmp" \