Closed arielsvn closed 4 years ago
I'm having an issue with Zeit that's very frustrating, where it's not letting me deploy a domain with the master
branch. When I add it they deploy dev
instead, which is the default branch of this project.
I filed a ticket with ZEIT to see if there's a way to fix this that doesn't involve changing the default branch of this repository. Recording of the problem
If this doesn't get fixed soon, we could use ZEIT CLI interface with CI to have both prod and dev deployed. Similar to this config
Talked with ZEIT today, they sort of fixed the issue, but it's still having trouble. I think they don't handle well repositories where the default branch isn't master
.
I added configuration to deploy with CircleCI, but this also failed, still not possible to deploy master
to one of their domains with this repo. Also, forked this repository and tested with one where master
was the default branch and it all worked as expected.
I'm very frustrated with ZEIT and need some advice to move forward @davidsmejia @kurtwheeler @cgreene
There're two compromises we would have to make if we wanted to use ZEIT:
Change the default branch of the repo to master
, at least until they fix the issue
If we want to use the out-of-the-box GitHub integrations we won't be able to use the staging API in the staging version, because they don't support different environment variables for staging/prod
Their main appeal was how easy it was to set up, but it looks like we hit multiple "corner cases" for them, like a repo where master
isn't the default branch and a staging deploy using staging API. Potentially we could also explore other solution from #857
Switch primary branch to master looks pretty straightforward. I guess the downside is that browsing github will show what's running instead of what's ready to be deployed.
Point 2 seems pretty annoying too. How hard is to modify theirs for the staging deployment?
Finally got staging/production deploys working, I had to change the default branch to master
and trigger these deploys via CircleCI. See refinebio.now.sh and refinebio-staging.now.sh.
I'm going to update now the DNS configuration for staging.refine.bio to ensure it points to the ZEIT servers. And if that works well, update www.refine.bio.
Current values:
CNAME | www | d39rwtw8lhqzje.cloudfront.net
CNAME | staging | d6gdj27t9po23.cloudfront.net
Closing this, refinebio's is now server-rendered. I checked the page speed insights and this reduced the time to first meaningful paint by more than 30%, for the search/experiment pages.
I'll file another issue in the backend to remove the terraform config related to the FE.
We discussed the roadmap for the deployment initially in https://github.com/AlexsLemonade/refinebio-frontend/pull/853#issuecomment-594640628. From those I finished today:
We have yet to take care of the following:
master
branch. I setup two domains now: