From 24c9f539ce975f0b3cbe8b634bc27ff87a8e3564 Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert Date: Sun, 21 Jun 2026 18:37:55 -0700 Subject: [PATCH] Minify site during deployment The files served by the website are not source code; the source is in the Git repo. Now that we have a customizable deployment workflow, minify the HTML, CSS, and JS before publishing. Don't minify generated API documentation to avoid having to debug any resulting problems. Switch build runner to Ubuntu 26.04 to get a newer version of minify. Signed-off-by: Benjamin Gilbert --- .github/workflows/pages.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 4e96123..6efc1e3 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -21,14 +21,22 @@ concurrency: jobs: build: name: Build site - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 steps: + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get -y install minify - name: Check out repo uses: actions/checkout@v7 - name: Set up Pages uses: actions/configure-pages@v6 - name: Build with Jekyll uses: actions/jekyll-build-pages@v1 + - name: Minify + run: | + sudo chown -R $USER:$USER _site + minify -ri _site --exclude '_site/api/**' - name: Upload artifact uses: actions/upload-pages-artifact@v5