From 745f32cf2c5266056ea75d7eff5e2387ace3d602 Mon Sep 17 00:00:00 2001 From: metincansiper Date: Wed, 3 Jan 2024 18:18:45 +0300 Subject: [PATCH] Updated storybook action --- .github/workflows/storybook.yml | 36 ++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/.github/workflows/storybook.yml b/.github/workflows/storybook.yml index a8e1e63..8393375 100644 --- a/.github/workflows/storybook.yml +++ b/.github/workflows/storybook.yml @@ -1,23 +1,31 @@ -name: Storybook +# Workflow name +name: Build and Publish Storybook to GitHub Pages + on: + # Event for the workflow to run on push: branches: - - dev + - 'dev' # Replace with the branch you want to deploy from + +permissions: + contents: read + pages: write + id-token: write +# List of jobs jobs: - build-and-deploy: + deploy: runs-on: ubuntu-latest + # Job steps steps: - - name: Checkout - uses: actions/checkout@v2.3.1 - - - name: Install and Build - run: | - npm install - npm run build-storybook + # Set up Node + - uses: actions/setup-node@v3 + with: + node-version: '16.x' - - name: Deploy - uses: JamesIves/github-pages-deploy-action@3.6.2 + #👇 Add Storybook build and deploy to GitHub Pages as a step in the workflow + - uses: bitovi/github-actions-storybook-to-github-pages@v1.0.1 with: - branch: gh-pages - folder: storybook-static # output folder from `npm run build-storybook` \ No newline at end of file + install_command: npm install # default: npm ci + build_command: npm run build-storybook # default: npm run build-storybook + path: storybook-static # default: dist/storybook \ No newline at end of file