From 855dc29d7c2b2a96121d4a8c6c1d2f2507d55f9e Mon Sep 17 00:00:00 2001 From: Pawel Kosiec Date: Fri, 24 Apr 2026 11:44:11 +0200 Subject: [PATCH] ci: validate devhub build on docs changes Add a devhub-validation job that clones devhub, syncs appkit docs from the PR branch, and runs the devhub build. This catches docs changes that would break the devhub site before they land on main. Supports forks via APPKIT_REMOTE env var override. --- .github/workflows/ci.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a9fffe54..e18e2c9b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -217,3 +217,40 @@ jobs: exit 1 fi + devhub-validation: + name: DevHub Build Validation + needs: detect-changes + if: needs.detect-changes.outputs.docs == 'true' + runs-on: + group: databricks-protected-runner-group + labels: linux-ubuntu-latest + + steps: + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 + + - name: Setup JFrog npm + uses: ./.github/actions/setup-jfrog-npm + + - name: Clone DevHub + # TODO: switch to main once databricks/devhub#58 merges (adds APPKIT_BRANCH env var support) + run: git clone --depth 1 --branch pkosiec/appkit-docs-sync https://github.com/databricks/devhub.git /tmp/devhub + + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 + with: + node-version: 22 + + - name: Install DevHub dependencies + working-directory: /tmp/devhub + run: npm install + + - name: Sync AppKit docs from PR branch + working-directory: /tmp/devhub + env: + APPKIT_REMOTE: ${{ github.event.pull_request.head.repo.clone_url || format('https://github.com/{0}.git', github.repository) }} + APPKIT_BRANCH: ${{ github.head_ref || github.ref_name }} + run: node scripts/sync-appkit-docs.mjs --force + + - name: Build DevHub + working-directory: /tmp/devhub + run: npm run build +