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

ci: Deploy storybook on gh-pages #937

Merged
merged 11 commits into from
Jan 3, 2023
Merged

ci: Deploy storybook on gh-pages #937

merged 11 commits into from
Jan 3, 2023

Conversation

mayank99
Copy link
Contributor

@mayank99 mayank99 commented Dec 27, 2022

Before

  • Hosts html test pages under / or /<pr-number>

Now (in/after this PR)

Pending issues

  • Leaves behind PR folders in gh-pages branch even after PR is closed/merged
  • Deployment takes a long time because thousands of test images need to be redeployed each time
    • This could be fixed by deploying test results to a different environment

@mayank99 mayank99 changed the base branch from mayank/portal to main December 27, 2022 19:21
@mayank99 mayank99 changed the base branch from main to mayank/portal December 27, 2022 19:21
@mayank99 mayank99 changed the base branch from mayank/portal to main December 27, 2022 19:21
@mayank99 mayank99 closed this Dec 27, 2022
@mayank99 mayank99 reopened this Dec 27, 2022
@mayank99 mayank99 force-pushed the mayank/gh-pages-storybook branch 5 times, most recently from bbc22bc to 7c100e4 Compare December 27, 2022 19:58
@mayank99 mayank99 changed the base branch from main to mayank/portal December 27, 2022 20:10
@mayank99 mayank99 marked this pull request as ready for review December 27, 2022 20:10
@mayank99 mayank99 requested a review from a team as a code owner December 27, 2022 20:10
@mayank99 mayank99 requested review from a team, gretanausedaite, elephantcatdog and r100-stack and removed request for a team and elephantcatdog December 27, 2022 20:10

jobs:
publish-storybook:
if: "${{ github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'autorelease: tagged') }}"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

previously (before merging repos) we were deploying storybook manually or whenever a release happened. but now it will be deployed automatically on every push.

if we want the old behavior, we can look into it after #875. changesets has a way to run arbitrary steps after a release is made. https://github.com/changesets/action#with-publishing

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's good to deploy storybook after every merge to main. Sometimes we forget to do that manually.
That said, I think it's good to have an option to deploy manually in case we need to do that from a branch.

@mayank99 mayank99 mentioned this pull request Dec 27, 2022
11 tasks
@mayank99 mayank99 self-assigned this Dec 27, 2022
Copy link
Contributor

@gretanausedaite gretanausedaite left a comment

Choose a reason for hiding this comment

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

Do we have (will we have after future updates to this script) an option to deploy and keep storybook/html pages from a branch? Eg. dev release, v2 / 3 / etc.

Base automatically changed from mayank/portal to main January 3, 2023 14:45
@mayank99
Copy link
Contributor Author

mayank99 commented Jan 3, 2023

Do we have (will we have after future updates to this script) an option to deploy and keep storybook/html pages from a branch? Eg. dev release, v2 / 3 / etc.

By default, storybook will automatically be deployed for every PR for preview.

I've added back manual publish workflow, but using it will override the default storybook at itwin.github.io/iTwinUI/react.

Copy link
Member

@r100-stack r100-stack left a comment

Choose a reason for hiding this comment

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

I'm new to using GitHub actions. So I left a few questions

Copy link
Member

@r100-stack r100-stack left a comment

Choose a reason for hiding this comment

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

I'm new to GitHub actions and so couldn't review the PR thoroughly. But overall, everything LGTM

@mayank99 mayank99 enabled auto-merge (squash) January 3, 2023 16:06
@mayank99 mayank99 merged commit 89d20f9 into main Jan 3, 2023
@mayank99 mayank99 deleted the mayank/gh-pages-storybook branch January 3, 2023 16:15
@mayank99 mayank99 linked an issue Jan 3, 2023 that may be closed by this pull request
11 tasks
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.

Combine repos
3 participants