Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/deploy-configurator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@ jobs:
- name: Build (prebuild re-syncs the token catalogue)
working-directory: configurator
run: npm run build
- name: Stage for Pages
run: mkdir -p _site/configurator && cp -r configurator/dist/. _site/configurator/
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5
with:
path: configurator/dist
path: _site
Comment on lines +51 to +56

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Verify the configurator build respects the nested deployment path.

The configurator will now be deployed at /SLASHED/configurator/ instead of /SLASHED/. The actions/configure-pages step (line 44) typically sets environment variables for the base URL, but you must verify that the configurator's build process actually uses these variables to configure the base path for asset references (JS, CSS, images, etc.).

If the build doesn't use the correct base path, the deployed app will have broken asset URLs resulting in 404 errors.

Run the following script to check if the configurator's build configuration uses the base path:

#!/bin/bash
# Description: Check configurator build config for base path configuration

# Look for common build config files and check if they reference base path or environment variables
echo "=== Checking for build configuration files ==="
fd -t f 'vite.config|next.config|webpack.config|rollup.config' configurator/

echo -e "\n=== Checking for base path configuration in build configs ==="
rg -n -C3 --type-add 'config:*.{js,ts,mjs,cjs}' --type config \
  -e 'base:?\s*process\.env' \
  -e 'basePath' \
  -e 'BASE_URL' \
  -e 'publicPath' \
  configurator/

echo -e "\n=== Checking package.json build scripts ==="
cat configurator/package.json | jq -r '.scripts | to_entries[] | select(.key | test("build|prebuild")) | "\(.key): \(.value)"'

Expected: The configurator should use environment variables set by configure-pages (such as GITHUB_PAGES, base URL, etc.) to configure the base path during the build step.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/deploy-configurator.yml around lines 51 - 56, The Pages
deployment now serves the app under /configurator/, so update and verify the
configurator build to use the base-path environment variables injected by the
actions/configure-pages step: inspect and, if missing, update the configurator's
build config (e.g., vite.config.js -> base, next.config.js -> assetPrefix,
webpack config -> publicPath or rollup -> base) to read process.env (e.g.,
BASE_URL, PUBLIC_URL or the configure-pages variables) and ensure the npm build
script in configurator/package.json passes those env vars during the build; also
confirm the workflow still stages the output into _site/configurator (the "Stage
for Pages" step) after the build so asset URLs resolve correctly.


deploy:
name: Deploy to Pages
Expand Down