[Question] Deploying to another repo.
niki4810 opened this issue · 2 comments
Hi,
I have a question about the storybook-deployer
. Currently I am having a setup where my codebase, storybook stories are in one repo (for e.g foo
), but I want to be able to deploy the generated static site to another repo (for e.g. foo-storybook
) ?
The reason for this is, when I used the storybook-deployer
with the default configuration, I was able to push the static site to the gh-page
branch of my main repo successfully however I noticed two things
- My entire code base code gets wiped out and the
gh-pages
branch only has the generated site - I believe
storybook-deployer
did agit push --force
into the gh-pages` branch.
I want to avoid these two steps on my main repo and keep the main code and the storybook site separate.
Please let me know if there is a way to achieve this. Thanks for you time.
Nikhilesh
You could try adding another remote ( https://github.com/storybooks/storybook-deployer/blob/master/README.md#custom-deploy-configuration) for your site repo and change the default branch to gh-pages
so it will behave like 2 different repos. But then you're basically tracking two copies of the same repo, and it doesn't get rid of running the git commands in your main repo.
Another option would be to try make the build command output to another repo folder (https://github.com/storybooks/storybook-deployer/blob/master/README.md#custom-build-configuration) and make that your website repo. It's slightly cumbersome but it satisfies your needs I think?