Skip to content

Commit ab41eee

Browse files
committed
f
1 parent 005de3a commit ab41eee

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/build_master.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,21 @@ jobs:
7878
cp -r /tmp/searchindex-backup/* . 2>/dev/null || true
7979
8080
# Now update/add our English searchindex file
81+
# First, compress the original file (in the build directory)
82+
cd "${GITHUB_WORKSPACE}"
8183
gzip -9 -k -f "$ASSET"
82-
cp "$ASSET" "${FILENAME}"
83-
cp "${ASSET}.gz" "${FILENAME}.gz"
8484
8585
# Show compression stats
8686
ORIGINAL_SIZE=$(wc -c < "$ASSET")
8787
COMPRESSED_SIZE=$(wc -c < "${ASSET}.gz")
8888
RATIO=$(awk "BEGIN {printf \"%.1f\", ($COMPRESSED_SIZE / $ORIGINAL_SIZE) * 100}")
8989
echo "Compression: ${ORIGINAL_SIZE} bytes -> ${COMPRESSED_SIZE} bytes (${RATIO}%)"
9090
91+
# Copy both versions to the searchindex repo
92+
cd /tmp/searchindex-repo
93+
cp "${GITHUB_WORKSPACE}/${ASSET}" "${FILENAME}"
94+
cp "${GITHUB_WORKSPACE}/${ASSET}.gz" "${FILENAME}.gz"
95+
9196
# Stage all files
9297
git add -A
9398

0 commit comments

Comments
 (0)