Skip to content

Commit cdc96ae

Browse files
committed
Use branch-based URL in PR preview comments
Changes PR comments to show the nicer branch-based URL: - Before: https://ef29be34.staging-cambeerfestival.pages.dev - After: https://claude-preview-domain-cicd-0.staging-cambeerfestival.pages.dev The branch-based alias is more readable and matches the branch name.
1 parent 1b3047e commit cdc96ae

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.github/workflows/build-deploy.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,8 @@ jobs:
270270
uses: actions/github-script@v7
271271
with:
272272
script: |
273-
const previewUrl = '${{ steps.deploy.outputs.deployment-url }}';
273+
const branch = '${{ github.head_ref }}';
274+
const previewUrl = `https://${branch}.staging-cambeerfestival.pages.dev`;
274275
const comment = `## 🚀 Cloudflare Pages Preview
275276
276277
Your preview deployment is ready!

0 commit comments

Comments
 (0)