Skip to content

Build PR previews with site.url set to the preview URL - #45

Merged
larsvilhuber merged 1 commit into
mainfrom
claude/preview-base-url
Sep 28, 2026
Merged

larsvilhuber merged 1 commit into
mainfrom
claude/preview-base-url

Conversation

@larsvilhuber

Copy link
Copy Markdown
Member

Summary

Templates build absolute links from site.url (via _includes/base_path), so on the Cloudflare preview, links such as those on /talks/ pointed at https://aeadataeditor.github.io instead of the preview.

On pull_request events, the build job now passes an extra Jekyll config setting url: https://pr-<number>.aeamain.pages.dev, which matches the --branch=pr-<number> alias used by the preview job. Pushes to main and manual runs still build with the production url, so the published site is unchanged.

Notes

  • Not tested end to end; the preview URL pattern is taken from the existing deploy step and the reported preview address. Check that links on the preview of this PR stay on pr-<n>.aeamain.pages.dev.
  • Fork PRs also build with the preview URL, but they are never deployed.
  • README-DEPLOYMENT.md updated with one line.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RBeXFA4VVU7vGuBVLRcPbZ


Generated by Claude Code

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RBeXFA4VVU7vGuBVLRcPbZ
@github-actions

Copy link
Copy Markdown

📖 Preview: https://pr-45.aeamain.pages.dev — commit c9cf503

@larsvilhuber
larsvilhuber merged commit 5126338 into main Sep 28, 2026
3 checks passed
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.

2 participants