Astro PR Preview Release
Preview releases let users install and test a PR's changes before it merges, using pkg.pr.new.
How to trigger
Add the pr preview label to the PR:
gh pr edit <PR_NUMBER> --repo withastro/astro --add-label "pr preview"
This kicks off a "Publish preview release" GitHub Actions job.
Monitoring
Poll until the job completes:
gh pr checks <PR_NUMBER> --repo withastro/astro | grep -i "preview"
The job typically completes within a few minutes. Once it shows pass, a pkg-pr-new bot will post a comment on the PR with install commands.
Reading the comment
The bot comment contains per-package install commands, for example:
npm i https://pkg.pr.new/astro@<PR_NUMBER>
npm i https://pkg.pr.new/@astrojs/cloudflare@<PR_NUMBER>
npm i https://pkg.pr.new/@astrojs/node@<PR_NUMBER>
Share the relevant package command(s) with the issue reporter so they can test the fix directly.
Which package to share
Point the reporter to the package(s) that contain the fix:
- Fix in
packages/astro/→ shareastro@<PR_NUMBER> - Fix in
packages/integrations/node/→ share@astrojs/node@<PR_NUMBER> - Fix in
packages/integrations/cloudflare/→ share@astrojs/cloudflare@<PR_NUMBER> - Fix touches multiple packages → share all relevant ones
Posting to the issue
After getting the install command, post a comment on the original issue so the reporter can try it:
gh issue comment <ISSUE_NUMBER> --repo withastro/astro --body "A preview build is available for testing:
\`\`\`
npm i https://pkg.pr.new/astro@<PR_NUMBER>
\`\`\`
Please let us know if this resolves the issue."