From 796e5a1df76dd216e04df1eb30db03965c5d931b Mon Sep 17 00:00:00 2001 From: Sudhanshu Dasgupta Date: Wed, 11 Oct 2023 17:22:18 +0530 Subject: [PATCH 1/3] feat(workflow): add storybook workflow Signed-off-by: Sudhanshu Dasgupta --- .github/workflows/storybook-deploy.yml | 34 ++++++++++++++++++++++++++ README.md | 9 ++++--- 2 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/storybook-deploy.yml diff --git a/.github/workflows/storybook-deploy.yml b/.github/workflows/storybook-deploy.yml new file mode 100644 index 000000000..7fb8a3475 --- /dev/null +++ b/.github/workflows/storybook-deploy.yml @@ -0,0 +1,34 @@ +name: Deploy Storybook + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [16, 18, 20] + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - name: Install dependencies + run: yarn install + + - name: Build Storybook + run: yarn build-storybook + + - name: Deploy Storybook + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./storybook-static diff --git a/README.md b/README.md index 0d2b99889..67b39dfc1 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ The Sistent Design System from Layer5 provides the open source building blocks to design and implement consistent, accessible, and delightful product experiences. - ### Packages Design System components in React, usually built with Vite. @@ -25,7 +24,7 @@ List of npm packages: Before you begin, ensure you have the following installed on your system: -- Node.js +- Node.js - Yarn ### How to get started @@ -37,7 +36,6 @@ Use `corepack enable` to go ahead and install yarn.
 
- ### Installation To set up the project, run the following command to install dependencies: @@ -46,25 +44,28 @@ To set up the project, run the following command to install dependencies: setup: yarn install ``` + To build the project, you can use the following command: + ``` build: install yarn run build-all ``` To check if your code meets the formatting standards, you can run: + ``` format-check: yarn run format:check ``` To automatically fix formatting issues, you can run + ``` format-fix: yarn run format:write ``` - ## Join the Layer5 community! From 36b43b8005989c14deadd9c64765a0b79245a906 Mon Sep 17 00:00:00 2001 From: Sudhanshu Dasgupta Date: Wed, 11 Oct 2023 17:35:20 +0530 Subject: [PATCH 2/3] feat(fix): fix workflow Signed-off-by: Sudhanshu Dasgupta --- .github/workflows/storybook-deploy.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/storybook-deploy.yml b/.github/workflows/storybook-deploy.yml index 7fb8a3475..88e8f90de 100644 --- a/.github/workflows/storybook-deploy.yml +++ b/.github/workflows/storybook-deploy.yml @@ -3,7 +3,10 @@ name: Deploy Storybook on: push: branches: - - master + - "*" + pull_request: + branches: + - "*" jobs: build: From 621ed0f5abc6f4a405e4578bd1f59844422c7fd5 Mon Sep 17 00:00:00 2001 From: Sudhanshu Dasgupta Date: Wed, 11 Oct 2023 17:53:08 +0530 Subject: [PATCH 3/3] feat(fix): fix the workflow Signed-off-by: Sudhanshu Dasgupta --- .github/workflows/storybook-deploy.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/storybook-deploy.yml b/.github/workflows/storybook-deploy.yml index 88e8f90de..8e5f805ff 100644 --- a/.github/workflows/storybook-deploy.yml +++ b/.github/workflows/storybook-deploy.yml @@ -28,7 +28,9 @@ jobs: run: yarn install - name: Build Storybook - run: yarn build-storybook + run: | + cd apps/design-system + yarn build-storybook - name: Deploy Storybook uses: peaceiris/actions-gh-pages@v3