Skip to content

Commit 95573db

Browse files
committed
ci: add gzip compression to stdlib docs & langref
1 parent a9c4dc8 commit 95573db

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

ci/srht/update_download_page

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,19 @@ cd "$HOME"
103103

104104
# Upload new stdlib autodocs
105105
mkdir -p docs_to_upload/documentation/master/std/
106-
cp "$ZIGDIR/docs/std/index.html" docs_to_upload/documentation/master/std/index.html
107-
cp "$ZIGDIR/docs/std/data.js" docs_to_upload/documentation/master/std/data.js
108-
cp "$ZIGDIR/docs/std/main.js" docs_to_upload/documentation/master/std/main.js
109-
cp "$LANGREF" docs_to_upload/documentation/master/index.html
110-
$S3CMD put -P --no-mime-magic --recursive --add-header="Cache-Control: max-age=0, must-revalidate" "docs_to_upload/" s3://ziglang.org/
106+
107+
gzip -c -9 "$ZIGDIR/docs/std/index.html" > docs_to_upload/documentation/master/std/index.html
108+
gzip -c -9 "$ZIGDIR/docs/std/data.js" > docs_to_upload/documentation/master/std/data.js
109+
gzip -c -9 "$ZIGDIR/docs/std/main.js" > docs_to_upload/documentation/master/std/main.js
110+
gzip -c -9 "$LANGREF" > docs_to_upload/documentation/master/index.html
111+
$S3CMD put -P --no-mime-magic --recursive --add-header="Content-Encoding:gzip" --add-header="Cache-Control: max-age=0, must-revalidate" "docs_to_upload/" s3://ziglang.org/
112+
113+
## Copy without compression:
114+
# cp "$ZIGDIR/docs/std/index.html" docs_to_upload/documentation/master/std/index.html
115+
# cp "$ZIGDIR/docs/std/data.js" docs_to_upload/documentation/master/std/data.js
116+
# cp "$ZIGDIR/docs/std/main.js" docs_to_upload/documentation/master/std/main.js
117+
# cp "$LANGREF" docs_to_upload/documentation/master/index.html
118+
# $S3CMD put -P --no-mime-magic --recursive --add-header="Cache-Control: max-age=0, must-revalidate" "docs_to_upload/" s3://ziglang.org/
111119

112120
git clone --depth 1 git@github.com:ziglang/www.ziglang.org.git
113121
cd www.ziglang.org

0 commit comments

Comments
 (0)