Skip to content

Commit

Permalink
feat: deploy storybook to github page #3870
Browse files Browse the repository at this point in the history
Closes #3867
  • Loading branch information
herleraja authored Jun 24, 2024
2 parents b0c5350 + 1e9c7cc commit 5800802
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/README.MD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
> [!WARNING]
> [!WARNING]
> This library no longer has a dedicated development resource maintaining it. When you are able to [migrate to Carbon v11](https://carbondesignsystem.com/migrating/guide/overview/) we recommend you reference the [related component guide](migration.md) and use components from [Carbon for IBM Products](https://carbon-for-ibm-products.netlify.app/?path=/story/overview-welcome--overview) and core [Carbon](https://react.carbondesignsystem.com/).
<p align="center">
Expand Down Expand Up @@ -40,7 +40,7 @@

**@latest from
[`master`](https://github.com/carbon-design-system/carbon-addons-iot-react/tree/master)**
&nbsp; - &nbsp; <a href="https://carbon-addons-iot-react.com">
&nbsp; - &nbsp; <a href="https://carbon-design-system.github.io/carbon-addons-iot-react">
<img valign=middle src="https://img.shields.io/badge/view%20%40latest-storybook-ff4785" alt="view @latest storybook" />
</a>

Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Deploy

on:
push:
branches:
- 'next'

permissions:
contents: read
pages: write
id-token: write

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.build-publish.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '16.x'

- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}

- id: build-publish
uses: bitovi/[email protected]
with:
path: packages/react/storybook-static
install_command: yarn --frozen-lockfile
build_command: yarn build:storybook
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"bugs": {
"url": "https://github.com/carbon-design-system/carbon-addons-iot-react/issues"
},
"homepage": "https://carbon-addons-iot-react.com",
"homepage": "https://carbon-design-system.github.io/carbon-addons-iot-react",
"scripts": {
"build:storybook": "node ./scripts/storybook.js --build",
"build": "lerna run --stream build",
Expand Down
4 changes: 2 additions & 2 deletions packages/react/README.MD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
> [!WARNING]
> [!WARNING]
> This library no longer has a dedicated development resource maintaining it. When you are able to [migrate to Carbon v11](https://carbondesignsystem.com/migrating/guide/overview/) we recommend you reference the [related component guide](../../.github/migration.md) and use components from [Carbon for IBM Products](https://carbon-for-ibm-products.netlify.app/?path=/story/overview-welcome--overview) and core [Carbon](https://react.carbondesignsystem.com/).
<p align="center">
Expand Down Expand Up @@ -40,7 +40,7 @@

**@latest from
[`master`](https://github.com/carbon-design-system/carbon-addons-iot-react/tree/master)**
&nbsp; - &nbsp; <a href="https://carbon-addons-iot-react.com">
&nbsp; - &nbsp; <a href="https://carbon-design-system.github.io/carbon-addons-iot-react">
<img valign=middle src="https://img.shields.io/badge/view%20%40latest-storybook-ff4785" alt="view @latest storybook" />
</a>

Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"bugs": {
"url": "https://github.com/carbon-design-system/carbon-addons-iot-react/issues"
},
"homepage": "https://carbon-addons-iot-react.com",
"homepage": "https://carbon-design-system.github.io/carbon-addons-iot-react",
"scripts": {
"build": "yarn svg-convert && cross-env BABEL_ENV='production' NODE_ENV='production' yarn build:pre && rollup -c && yarn build:post",
"build:pre": "yarn test:engines && rimraf lib es umd css scss tmp storybook-static",
Expand Down

0 comments on commit 5800802

Please sign in to comment.