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

Branch domain support #948

Open
Sceat opened this issue Jun 12, 2020 · 9 comments
Open

Branch domain support #948

Sceat opened this issue Jun 12, 2020 · 9 comments
Labels
type: feature code contributing to the implementation of a feature and/or user facing functionality

Comments

@Sceat
Copy link

Sceat commented Jun 12, 2020

Feature request

Now that we can branch deploy through the cli #275 , how can we add a domain on the generated https://<branch>--<app name>.netlify.app/ ?

@Lanchi
Copy link

Lanchi commented Jun 29, 2020

Apparently, it's not possible to do so: Setting Branch Subdomain for Manual Branch Deploys

@drewrawitz
Copy link

drewrawitz commented Jun 30, 2020

My workaround for this right now is something like this:

  "scripts": {
    "deploy": "cross-env BRANCH=$(git symbolic-ref --short HEAD) USER=\"$(git config user.name)\" yarn deploy:branch",
    "deploy:branch": "cross-env-shell yarn build && netlify deploy --dir dist --open --alias $BRANCH --message \"A new local branch deploy from branch $BRANCH by $USER.\"",
  },

So I just run yarn deploy in the command line to kick off a Netlify build that uses the current branch name as the alias. It works ok, the problem that I'm noticing are the unpredictable URL's.

Some examples:

Alias Result
feature-5345-cm-icon-picker Not found
iconpicker Not found
icon-picker Successful

I have no idea why the first two don't work, but the last one with a dash in it worked just fine. I haven't been able to figure out the pattern for what makes a successful URL. I'm currently in contact with support, so I'll report back any findings. If anyone else has any ideas, please let me know!

@erezrokah erezrokah added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Aug 20, 2020
@shukryzablah
Copy link

I would also like to point my domain to the aliased branch deploy

@zbruhnke
Copy link

zbruhnke commented Jan 5, 2021

adding a +1 for this as it would be a major help to our current workflow!

@arpadgabor
Copy link

arpadgabor commented Apr 10, 2022

We are also looking for support in this regard! We are using cli deploys because (1) we can check logs faster, (2) we can add additional checks in pipelines (e.g. Sonar scanning) and (3) we are migrating to Trunk Based Development, so we are using the main branch for development and we create separate release branches, all of the logic being handled inside GitHub Actions. Having custom domains in branch deploys (even just setting up some hardcoded ones manually is fine) would help a lot.

@arpadgabor
Copy link

Do we have any update on this request? Maybe if there has been any progress on the backend side at least? Not sure who to ping, @erezrokah @khendrikse

@fostimus
Copy link

this would be great, we could also use this

@pixelart7
Copy link

+1 for this. My team moved to Netlify DNS for this feature but unexpected when it only apply to netlify.app domain (build then deploy with alias)

@jame-earnin
Copy link

I think it is the most common feature request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

No branches or pull requests

10 participants