Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .changeset/clean-stale-api-docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
25 changes: 25 additions & 0 deletions .github/workflows/generate-api-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,31 @@ jobs:
echo "All versions up to date — nothing to generate"
fi

- name: Remove outdated version docs
if: ${{ !inputs.versions }}
Comment thread
akudev marked this conversation as resolved.
working-directory: gh-pages
run: |
VERSIONS="${{ steps.versions.outputs.versions }}"
if [ -z "$VERSIONS" ]; then
echo "No versions detected — skipping cleanup"
exit 0
fi

for FW in openui5 sapui5; do
FW_DIR="api/${FW}"
[ -d "$FW_DIR" ] || continue
for DIR in "$FW_DIR"/*/; do
[ -d "$DIR" ] || continue
MINOR=$(basename "$DIR")
# Check if this minor is in the detected versions for this framework
PKG=$( [[ "$FW" == "openui5" ]] && echo "@openui5/types" || echo "@sapui5/types" )
if ! echo "$VERSIONS" | grep -qF "${PKG}@${MINOR}."; then
echo "🗑 Removing outdated ${FW}/${MINOR}"
rm -rf "$DIR"
fi
done
done

- name: Update index pages
working-directory: gh-pages
run: |
Expand Down
Loading