Skip to content

Fix preview basePath to match pr-preview-action deploy path#24

Open
kaankacar wants to merge 1 commit into
mainfrom
23-preview-basepath-misses-pr--prefix-unstyled-preview-pages
Open

Fix preview basePath to match pr-preview-action deploy path#24
kaankacar wants to merge 1 commit into
mainfrom
23-preview-basepath-misses-pr--prefix-unstyled-preview-pages

Conversation

@kaankacar
Copy link
Copy Markdown
Collaborator

Closes #23.

preview-pr.yml was building Next.js with NEXT_BASE_PATH=/pr/<N> while rossjrw/pr-preview-action actually deploys under /pr/pr-<N>/ so asset URLs in the built HTML 404'd and previews rendered unstyled. Add the pr- prefix to the basePath so it matches the deploy path.

Production is unaffected (this workflow only runs on pull_request; deploy-pages.yml is independent).

`rossjrw/pr-preview-action` deploys previews to `<umbrella-dir>/pr-<N>` by
default, but the workflow was building Next.js with `NEXT_BASE_PATH=/pr/<N>`
(no `pr-` prefix). Asset URLs baked into the HTML were therefore looking
for `/pr/22/_next/...` while the files were actually served at
`/pr/pr-22/_next/...`, returning 404 and producing an unstyled preview.

Add the `pr-` prefix so the basePath matches where the action publishes.

Closes #23.
@kaankacar kaankacar self-assigned this May 20, 2026
Copilot AI review requested due to automatic review settings May 20, 2026 18:04
@kaankacar kaankacar linked an issue May 20, 2026 that may be closed by this pull request
@github-actions
Copy link
Copy Markdown

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://stellar.github.io/stellar-dev-skill/pr/pr-24/

Built to branch gh-pages at 2026-05-20 18:05 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the PR preview GitHub Actions workflow so the Next.js basePath matches the directory structure used by rossjrw/pr-preview-action, preventing broken asset URLs (unstyled previews) on skills.stellar.org.

Changes:

  • Adjust NEXT_BASE_PATH from /pr/<N> to /pr/pr-<N> for PR preview builds.
  • Expand the workflow comments to document why the pr- prefix is required.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Preview basePath misses pr- prefix → unstyled preview pages

2 participants