Skip to content

Commit cb08d5e

Browse files
Add existence check before moving DemoProjects
Updated build_static_site.sh to verify DemoProjects directory exists before attempting to move it, preventing errors if the source directory is missing.
1 parent ec573ea commit cb08d5e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/build_static_site.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,16 @@ rm -rf external/js-lzma/data
129129

130130
# Move DemoProjects based on current directory
131131
if [ "$(basename $PWD)" = "Browser_IDE" ]; then
132-
mv ../../DemoProjects DemoProjects
132+
# We're in Browser_IDE, check if DemoProjects exists at ../../DemoProjects
133+
if [ -d "../../DemoProjects" ]; then
134+
mv ../../DemoProjects DemoProjects
135+
fi
133136
cd ../../
134137
else
135-
mv ../DemoProjects DemoProjects
138+
# We're in sko/, check if DemoProjects exists at ../DemoProjects
139+
if [ -d "../DemoProjects" ]; then
140+
mv ../DemoProjects DemoProjects
141+
fi
136142
# Create Browser_IDE directory and move everything into it for consistent upload structure
137143
mkdir -p Browser_IDE
138144
# Move all files except Browser_IDE itself into Browser_IDE

0 commit comments

Comments
 (0)