PR preview pages render but show up unstyled because preview-pr.yml builds Next.js with NEXT_BASE_PATH=/pr/<N> while rossjrw/pr-preview-action actually deploys to /pr/pr-<N>/ (its umbrella-dir adds a pr- prefix), so every asset URL baked into the HTML 404s.
Reproduce: open any preview (e.g. https://skills.stellar.org/pr/pr-22/) — HTML loads, but CSS/JS requests to /pr/22/_next/... return 404; the same files exist at /pr/pr-22/_next/....
Fix: add pr- to the basePath line in .github/workflows/preview-pr.yml (around line 85):
# before
echo "NEXT_BASE_PATH=${base}/pr/${{ github.event.number }}" >> "$GITHUB_ENV"
# after
echo "NEXT_BASE_PATH=${base}/pr/pr-${{ github.event.number }}" >> "$GITHUB_ENV"
The fix touches only preview-pr.yml, which runs on pull_request events. Production (deploy-pages.yml) is independent and unaffected.
PR preview pages render but show up unstyled because
preview-pr.ymlbuilds Next.js withNEXT_BASE_PATH=/pr/<N>whilerossjrw/pr-preview-actionactually deploys to/pr/pr-<N>/(itsumbrella-diradds apr-prefix), so every asset URL baked into the HTML 404s.Reproduce: open any preview (e.g. https://skills.stellar.org/pr/pr-22/) — HTML loads, but CSS/JS requests to
/pr/22/_next/...return 404; the same files exist at/pr/pr-22/_next/....Fix: add
pr-to the basePath line in.github/workflows/preview-pr.yml(around line 85):The fix touches only
preview-pr.yml, which runs onpull_requestevents. Production (deploy-pages.yml) is independent and unaffected.