menu

ZEIT

Our mission is to make cloud computing as easy and accessible as mobile computing. You can find our Next.js community here.

Channels
Team

Github Integration: Branch dependent alias

November 17, 2018 at 7:47pm

Github Integration: Branch dependent alias

November 17, 2018 at 7:47pm

Is there any plan in the roadmap for allowing the github integration to support a branch dependent alias?

For instance, pushes to my dev branch alias to dev.domain.com and pushes to my master branch alias to domain.com?

Could probably be configured in now.json as something like:

alias: [
{ branch: "dev", alias: "dev.domain.com" },
{ branch: "master", alias: "domain.com" },
]

November 23, 2018 at 12:40am

Hi

this sounds interesting! I am moving this thread to our new Features Requests channel.

cc

like-fill
1
  • reply
  • like

November 23, 2018 at 7:22am

I really like that approach.

  • reply
  • like

November 23, 2018 at 9:03pm

would also love the abiblity to just have branch be a prefix on the master domain. In the above example, branch feature-foo would map to feature-foo.domain.com

  • reply
  • like

November 26, 2018 at 5:13am

Hi

this sounds interesting! I am moving this thread to our new Features Requests channel.

cc

Yeah! This is something interesting. But I'd like to use our github property for this.

like-fill
2
  • reply
  • like

would also love the abiblity to just have branch be a prefix on the master domain. In the above example, branch feature-foo would map to feature-foo.domain.com

This could be problematic if we do this by default. Because branch-name.now.sh won't be available all the time. Even the team is using a custom suffix, this could be a problem since multiple repos could have the same branch name.

  • reply
  • like

But we could give a unique URL like for branch this: https://zeit.co/github/url/org/repo/branch

  • reply
  • like

But we could give a unique URL like for branch this: https://zeit.co/github/url/org/repo/branch

Which always redirects to the latest deployment of a given branch.

like-fill
2
  • reply
  • like

November 26, 2018 at 10:22pm

Yeah! This is something interesting. But I'd like to use our github property for this.

+1 to using the github property for this.

  • reply
  • like

November 27, 2018 at 3:17pm

Well, In my case I want to deploy by pushing to github - master to www.example.com, staging to staging.example.com and so on, I get used to that with my Netlify deploy. The only issue I have with Netlify - it is not accessible from Russia and Luxemburg... so I'm looking where else to deploy my existing project which required to be accesdible in Russia.

  • reply
  • like

I do not need netlify's domain name - I need to use my custom domain name only.

  • reply
  • like

January 23, 2019 at 1:56pm

are there any updates on this? it would be really useful to be able to deploy each branch to a new subdomain, I've checked on the docs and found very little on the github property too.

like-fill
3
  • reply
  • like

February 11, 2019 at 7:41pm

This seems like a no-brainer! Right now I have to have master branch as the default even though PRs should really default to merging into the development branch. Clearly you don't want to alias every potential branch, but common ones like development|dev|canary could be helpful options. Can make other integrations simpler, like running Cypress against your dev branch after it deploys, etc

  • reply
  • like

February 19, 2019 at 8:32pm

I also think this would be incredibly useful for my work/teams. Any updates on this, or has anyone written a custom solution (webhooks maybe?)

like-fill
1
  • reply
  • like

February 20, 2019 at 7:27am

Maybe this could be done with GitHub actions

  • reply
  • like

February 20, 2019 at 1:42pm

Yes, that is very possibe: https://github.com/actions/example-zeit-now But we still want to improve our own integration to cover more cases...

  • reply
  • like

February 20, 2019 at 8:07pm

Do you have an example configuration?

  • reply
  • like

Awesome. Thanks!

  • reply
  • like

April 10, 2019 at 11:17pm

Hello! We are excited to share this with you: https://zeit./blog/automatic-aliasing Let me know if you have any feedback for us cc

like-fill
1
  • reply
  • like

Can you adress this issue related to auto aliases?

How to change deployment alias name

thumbsup
2
message-simple
10

  • reply
  • like

July 5, 2019 at 3:47pm

Hi, I have an external domain alias defined in my now.json. That alias seems to be applied to all the other branches (PR) being deployed using the github integration. Is it expected?

  • reply
  • like

Hi, I have an external domain alias defined in my now.json. That alias seems to be applied to all the other branches (PR) being deployed using the github integration. Is it expected?

It is not expected. it should only alias on the default branch.

  • reply
  • like

December 20, 2019 at 2:52pm

March 26, 2020 at 2:21pm

Now that assigning a domain to git branch is possible it would be really helpfull that in same modal window you can assign environment specific variables for that environment/branch, so we don't have to have staging.now.json and production.now.json and manually deploy with now -A staging.now.json. We have use case where we pass different api keys based on enviroment and enpoint urls, and having just development(locally in .env)/production(in now secrets mapped in now.json) env vars is not enough.

like-fill
1
  • reply
  • like
private
This channel has been archived