Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 Feature Request: Get alias after wrangler pages deploy #3717

Closed
paulk4633 opened this issue Aug 8, 2023 · 8 comments · Fixed by #6643
Closed

🚀 Feature Request: Get alias after wrangler pages deploy #3717

paulk4633 opened this issue Aug 8, 2023 · 8 comments · Fixed by #6643
Assignees
Labels
awaiting reporter response Needs clarification or followup from OP enhancement New feature or request pages Relating to Pages

Comments

@paulk4633
Copy link

paulk4633 commented Aug 8, 2023

Describe the solution

Currently, the wrangler pages deploy command just returns the URL of the current deployment and not the alias. Especially for very long branches > 28 characters, it's unpredictable how the alias will look like.

@paulk4633 paulk4633 added the enhancement New feature or request label Aug 8, 2023
@jspspike jspspike added the pages Relating to Pages label Aug 9, 2023
@weiklr
Copy link

weiklr commented Sep 29, 2023

yes i need this as well. will be nice if we can access the alias via output step on github actions somehow

@BenoitRichard1212
Copy link

+1

@CarmenPopoviciu CarmenPopoviciu added pages-dev Relating to `pages dev` command and removed pages-dev Relating to `pages dev` command labels Apr 24, 2024
@CarmenPopoviciu
Copy link
Contributor

CarmenPopoviciu commented Jun 27, 2024

hi folks,

just to clarify... what is meant by alias here? The current format of the deployment URL is
https://<sha>.<PROJECT_NAME>.pages.dev

@CarmenPopoviciu CarmenPopoviciu added the awaiting reporter response Needs clarification or followup from OP label Jun 28, 2024
@penalosa
Copy link
Contributor

penalosa commented Jul 8, 2024

We haven't heard from you in while so I'm going to close this issue for now. If you're still running into problems feel free to comment with more details and we can investigate further.

@penalosa penalosa closed this as completed Jul 8, 2024
@iulspop
Copy link

iulspop commented Sep 4, 2024

hi folks,

just to clarify... what is meant by alias here? The current format of the deployment URL is https://<sha>.<PROJECT_NAME>.pages.dev

@CarmenPopoviciu

"When a preview deployment is published, it is given a unique, hash-based address — for example, <hash>.<project>.pages.dev. These are atomic and may always be visited in the future. However, Pages also creates an alias for git branch’s name and updates it so that the alias always maps to the latest commit of that branch." (doc link)

See this example:
image

I'd like this get the alias url from the wrangler pages deploy output too.

@iulspop
Copy link

iulspop commented Sep 4, 2024

wrangler pages deployment list also doesn't output this value, so I have no way of getting the alias url with wrangler.

@iulspop
Copy link

iulspop commented Sep 4, 2024

for now I'm running this command in my github action so I can get the url manually:

      - name: 🖨️ Print link to find preview alias URL
        run: echo "Find the preview alias here https://dash.cloudflare.com/accountid/workers-and-pages?type=pages"

@WalshyDev
Copy link
Member

WalshyDev commented Sep 13, 2024

This is now available in Wrangler v3.78.0 -- to grep the alias you can do npx wrangler pages deploy <dir> | grep 'Deployment alias URL' | awk '{print $5}'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting reporter response Needs clarification or followup from OP enhancement New feature or request pages Relating to Pages
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

10 participants