cloudflare / pages-action

MIT License
468 stars 95 forks source link

fix: ensure alias is set to branch #40

Open sastan opened 1 year ago

sastan commented 1 year ago

This PR ensures to always set the alias url output to point to the branch url by replacing the hash in the deployment url with the branch name.

WalshyDev commented 1 year ago

This won't always work. Ideally, we just remove the race condition instead or have it exposed regardless. I'll leave this open for now

jasikpark commented 1 year ago

++ to fixing this - we use direct uploads & pass a branch name, resulting in url === alias on most runs

I'll just hardcode the url myself for now... https://${{ steps.branch-name.outputs.current_branch }}.${{ env.CF_PROJECT_SLUG }}.pages.dev/

jasikpark commented 1 year ago

ah, hardcoding has some caveats since. it needs to be url encoded somehow + cf truncates branch names in the subdomain

Hanawa02 commented 1 month ago

Would it be possible to pass the alias instead?