Skip to content

Commit ed92ae8

Browse files
committed
refactor(ci): modify binary handling in documentation build workflow to allow continuation without binaries
1 parent e6a581d commit ed92ae8

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

.github/workflows/docs_build.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -99,24 +99,25 @@ jobs:
9999
mkdir -p docs/_static/binaries
100100
101101
if [ ! -d "docs_binaries" ]; then
102-
echo "ERROR: No docs_binaries directory found!"
103-
echo "Cannot proceed without binaries. Exiting."
104-
exit 1
102+
echo "WARNING: No docs_binaries directory found!"
103+
echo "Continuing anyway - docs will build without binaries."
104+
exit 0
105105
fi
106106
107107
# Find all .bin files in docs_binaries
108108
echo "Processing binary files from macOS builds..."
109-
bin_count=0
110-
skip_count=0
111-
109+
112110
# Binaries are stored in structure like:
113111
# docs_binaries/{target}/{SketchName}/build.tmp/{SketchName}.ino.bin
114112
# We need to:
115113
# 1. Extract sketch name and target from path
116114
# 2. Find the sketch in libraries/ directory
117115
# 3. Copy to docs/_static/binaries/libraries/{LibraryName}/examples/{SketchName}/{target}/
118-
119-
find docs_binaries -type f -name "*.bin" | while read -r bin_file; do
116+
117+
bin_count=0
118+
skip_count=0
119+
120+
while IFS= read -r bin_file; do
120121
echo "Processing: $bin_file"
121122
122123
# Extract the binary filename (e.g., WiFiClientSecure.ino.bin)
@@ -164,8 +165,8 @@ jobs:
164165
cp "$bin_file" "$output_dir/"
165166
echo " → Copied to: $output_dir/$bin_name"
166167
bin_count=$((bin_count + 1))
167-
done
168-
168+
done < <(find docs_binaries -type f -name "*.bin")
169+
169170
echo ""
170171
echo "=========================================="
171172
echo "Binary copy completed!"

0 commit comments

Comments
 (0)