From e6bd6a9012f6905ea659b1246f263f0df2319634 Mon Sep 17 00:00:00 2001 From: James Rich <2199651+jamesarich@users.noreply.github.com> Date: Mon, 6 Jul 2026 18:37:32 -0500 Subject: [PATCH] ci(docs): overlap Dokka and Jekyll builds to cut deploy wall-time (#6122) Co-authored-by: Claude Opus 4.8 --- .github/workflows/docs-deploy.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docs-deploy.yml b/.github/workflows/docs-deploy.yml index a941eaf00..548ff48a7 100644 --- a/.github/workflows/docs-deploy.yml +++ b/.github/workflows/docs-deploy.yml @@ -45,9 +45,6 @@ jobs: with: gradle_encryption_key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} - - name: Build Dokka HTML documentation - run: ./gradlew dokkaGeneratePublicationHtml --no-configuration-cache - - name: Setup Ruby uses: ruby/setup-ruby@v1 with: @@ -58,18 +55,23 @@ jobs: - name: Generate Docs Site run: ./gradlew generateDocsBundle validateDocsBundle publishDocsSite -Pdocs.channel=root -Pci=true - - name: Compile Jekyll Docs Site + # Dokka (Gradle) and Jekyll (Ruby) are independent — Dokka's output is only + # copied in afterwards — so run them concurrently to overlap the two slowest + # steps (~10 min Dokka vs ~5 min Jekyll) instead of summing them (~16 -> ~11 min). + - name: Build Dokka + Jekyll concurrently run: | + set -euo pipefail BUNDLE_GEMFILE=docs/Gemfile bundle exec jekyll build \ --source build/_site \ --destination build/jekyll_site \ - --baseurl /${{ github.event.repository.name }} + --baseurl /${{ github.event.repository.name }} & + jekyll_pid=$! + ./gradlew dokkaGeneratePublicationHtml --no-configuration-cache + wait "$jekyll_pid" touch build/jekyll_site/.nojekyll - name: Assemble Pages artifact - run: | - # Copy Dokka output into compiled jekyll_site/api/ - cp -r build/dokka/html build/jekyll_site/api + run: cp -r build/dokka/html build/jekyll_site/api # Dokka HTML -> /api - name: Upload Pages Artifact uses: actions/upload-pages-artifact@v5