ci: optimize APT package installation by skipping documentation
Co-Authored-By: sketch <hello@sketch.dev>
Change-ID: sf483afee70439c11k
diff --git a/.github/scripts/optimize-apt.sh b/.github/scripts/optimize-apt.sh
new file mode 100755
index 0000000..b5d43d7
--- /dev/null
+++ b/.github/scripts/optimize-apt.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+set -e
+
+# Skip installing package docs (makes the man-db trigger much faster)
+# (I disabled `/doc` and `/info` too, just in case.)
+sudo tee /etc/dpkg/dpkg.cfg.d/01_nodoc > /dev/null << 'EOF'
+path-exclude /usr/share/doc/*
+path-exclude /usr/share/man/*
+path-exclude /usr/share/info/*
+EOF
+
+echo "APT optimization configured - documentation installation disabled"