From 025b33aed4c42fe82edbb48dacc6b862c44064f0 Mon Sep 17 00:00:00 2001 From: Tadas Labutis Date: Thu, 4 Jun 2026 15:19:20 +0300 Subject: [PATCH] CI: build React settings app in release/deploy/zip pipelines The admin settings screen is a Vite/React app whose compiled bundle (views/js/admin/dist) is gitignored. The packaging workflows only ran composer, so released ZIPs shipped without saferpay-settings.js/.css, leaving the Settings page blank. Add a pnpm install + build step (pinned to pnpm 9 so esbuild's build script runs) before zipping in release.yml, deploy.yml and create_zip.yml, then strip node_modules/src. Mirrors the Mollie module pipeline. --- .github/workflows/create_zip.yml | 19 +++++++++++++++++++ .github/workflows/deploy.yml | 19 +++++++++++++++++++ .github/workflows/release.yml | 19 +++++++++++++++++++ 3 files changed, 57 insertions(+) diff --git a/.github/workflows/create_zip.yml b/.github/workflows/create_zip.yml index bc651db1e..70f1bc32e 100644 --- a/.github/workflows/create_zip.yml +++ b/.github/workflows/create_zip.yml @@ -20,6 +20,25 @@ jobs: with: fetch-depth: 0 + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: pnpm + cache-dependency-path: views/js/admin/settings-app/pnpm-lock.yaml + + - name: Build React settings app + run: | + cd views/js/admin/settings-app + pnpm install --frozen-lockfile + pnpm run build + rm -rf node_modules src + - name: Build module ZIP run: | composer install --no-dev --optimize-autoloader --classmap-authoritative diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7a27648a4..ba9fc0cb2 100755 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -18,6 +18,25 @@ jobs: with: php-version: '5.6' + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: pnpm + cache-dependency-path: views/js/admin/settings-app/pnpm-lock.yaml + + - name: Build React settings app + run: | + cd views/js/admin/settings-app + pnpm install --frozen-lockfile + pnpm run build + rm -rf node_modules src + - name: Build module ZIP # IF YOU EDIT THIS, DON'T FORGET TO EDIT release.yml run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f178b1a93..cbaf91311 100755 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,6 +19,25 @@ jobs: with: php-version: '5.6' + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: pnpm + cache-dependency-path: views/js/admin/settings-app/pnpm-lock.yaml + + - name: Build React settings app + run: | + cd views/js/admin/settings-app + pnpm install --frozen-lockfile + pnpm run build + rm -rf node_modules src + - name: build # IF YOU EDIT THIS, DON'T FORGET TO EDIT deploy.yml run: |