Netlify subdomains work based on branches on a repo. If I have a domain say xyz.com and repo Repo-A, the master branch will deploy to xyz.com and dashboard branch will deploy to dashboard.xyz.com. However the dashboard and master branch are very different expect for a few visual elements.
I’m trying to figure out a clean way to structure the repo
Repo - A
(master branch)
src/app
package.json
webpack.config.js
Repo - A
(dashboard branch)
src/app
package.json
webpack.config.js
The problem with this approach is I’d have to change my webpack, package and src files extensively.
I believe switching back and forth between branches will generate a lot of junk in the dist/ folder too.
What’s the best repo structure to make this work? Are there tools to make life simpler for this use case?
Another approach -
Create a Release Repo that has release branches like master and dashboard.
master commits to Repo A which pushes build to master branch of Release repo
master commits to Repo B which pushes build to dashboard branch of Release repo
Is this a cleaner approach compared to first one? Any suggestions?
