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

fix: ensure alias is set to branch #40

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sastan
Copy link

@sastan sastan commented Dec 12, 2022

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.

@sastan sastan requested a review from a team as a code owner December 12, 2022 08:56
@WalshyDev
Copy link
Member

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
Copy link
Contributor

jasikpark commented Dec 22, 2022

++ 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
Copy link
Contributor

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

@Hanawa02
Copy link

Would it be possible to pass the alias instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants