Skip to content

Commit 80cb041

Browse files
committed
chore: apply AI suggested changes
1 parent 7a0eb7b commit 80cb041

File tree

1 file changed

+25
-11
lines changed

1 file changed

+25
-11
lines changed

.github/workflows/release.yml

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,35 @@ jobs:
2626
npm ci
2727
npm run release
2828
if [ -d "dist/" ]; then
29-
echo "released=true" >> "$GITHUB_OUTPUT"
29+
echo "released=true" >> "$GITHUB_OUTPUT"
3030
31-
npm run typedoc
31+
npm run typedoc
3232
33-
# Remove any unnecessary files or directories that might contain symlinks or large files
34-
# For example, remove node_modules from 'examples' to avoid copying symlinks
35-
rm -rf examples/node_modules
33+
# Remove any unnecessary files or directories that might contain symlinks or large files
34+
# For example, remove node_modules from 'examples' to avoid copying symlinks
35+
rm -rf examples/node_modules
3636
37-
# Copy only the required content to the docs folder
38-
mkdir -p docs
39-
cp -r dist/* docs/
40-
cp -r examples docs/
37+
# Clean up any existing docs directory
38+
rm -rf docs
4139
42-
# Delete symbolic links under the docs directory.
43-
find docs -type l -exec rm {} \;
40+
# Copy only the required content to the docs folder
41+
mkdir -p docs
42+
cp -r dist/* docs/
43+
44+
# Copy examples but exclude symlinks and hard links
45+
# find examples -type f -exec cp --parents {} docs/ \;
46+
47+
# Alternative safer copy for examples (if the above doesn't work)
48+
rsync -av --copy-links --exclude='node_modules' examples/ docs/examples/
49+
50+
# Delete any symbolic links and hard links under the docs directory
51+
find docs -type l -delete
52+
find docs -links +1 -type f -delete
53+
54+
# Show directory size for debugging
55+
du -sh docs/
56+
else
57+
echo "released=false" >> "$GITHUB_OUTPUT"
4458
fi
4559
env:
4660
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)