🚀 Feature Request: Get alias after `wrangler pages deploy`
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.
yes i need this as well. will be nice if we can access the alias via output step on github actions somehow
+1
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
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.
hi folks,
just to clarify... what is meant by
aliashere? The current format of the deployment URL ishttps://<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:
I'd like this get the alias url from the wrangler pages deploy output too.
wrangler pages deployment list also doesn't output this value, so I have no way of getting the alias url with wrangler.
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"
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}'