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

Storybook deploy #5

Merged
merged 5 commits into from
May 29, 2021
Merged

Storybook deploy #5

merged 5 commits into from
May 29, 2021

Conversation

Illustrova
Copy link
Collaborator

@Illustrova Illustrova commented May 25, 2021

Here comes new deployment system - we deploy product in the root, see example at https://illustrova.github.io/ws-workflow-test/, and storybook under the subpath: https://illustrova.github.io/ws-workflow-test/storybook.

This setup has few drawbacks (?) though.

  1. I had to replace in product/package.json:
-     "design-system": "0.1.0",
+     "design-system": "*",

I remember you didn't want this, but the thing is that the workflow fill fail every time the version doesn't match. Even if you are not working on product yet, and only want to deploy storybook, immediately after the design-system version is bumped, it has to match in product workspace. Seems yarn cannot install dependencies for selected workspace only. So either this, or to instruct participants to change it every time.

  1. I have to redeploy storybook every time when product is deployed - this is unavoidable, if we like to host product in the root. For that reason I had to copy-paste part of storybook workflow into product workflow. The best would probably be to rework all workflows, split into smaller parts and reuse, but didn't want to loose time on this now.

@Illustrova Illustrova requested a review from varya May 25, 2021 10:43
@@ -62,3 +64,20 @@ jobs:
with:
folder: ./product/build
branch: gh-pages

## The following steps are for storybook deployment. Since we host product in the root, storybook will be overwritten every time we deploy a product. With these steps we restore it back
- name: Build design tokens
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy-pasted code

@@ -7,7 +7,7 @@
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"design-system": "0.1.0",
"design-system": "*",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

design-system version set to any

@Illustrova
Copy link
Collaborator Author

After only 70+ tests it's (hopefully) working as it should
Screen Shot 2021-05-28 at 23 51 05

@Illustrova Illustrova requested a review from varya May 28, 2021 20:52
@varya varya merged commit 883c43c into main May 29, 2021
@Illustrova Illustrova deleted the storybook-deploy branch September 1, 2021 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants