Skip to content

Commit

Permalink
Storybook workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
petar-basic committed Oct 18, 2024
1 parent be04269 commit d5f7072
Show file tree
Hide file tree
Showing 4 changed files with 118 additions and 102 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/chat-widget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ on:
push:
branches: main
pull_request:
workflow_dispatch:
inputs:
version:
required: true
type: choice
description: Increment ChatWidget NPM version
default: 'patch'
options:
- patch
- minor
- major

jobs:
build:
Expand All @@ -19,10 +30,6 @@ jobs:
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
with:
node-version-file: '.nvmrc'

# TODO: NPM login instead of auth token?
# - name: Authenticate with private NPM package
# run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc

- name: Install dependencies
run: npm ci
Expand All @@ -41,3 +48,11 @@ jobs:

- name: E2E - Run automation suite
run: npm run e2e:run

- name: Authenticate with private NPM package
# if: ${{ github.event_name == 'workflow_dispatch' }}
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc

- name: NPM Publish ChatWidget
# if: ${{ github.event_name == 'workflow_dispatch' }}
run: npm run lerna publish bump patch --yes
11 changes: 11 additions & 0 deletions storybook/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,16 @@ const config: StorybookConfig = {
docsMode: true,
defaultName: "Documentation",
},
async viteFinal(config) {
const { mergeConfig } = await import('vite');

return mergeConfig(config, {
server: {
fs: {
allow: ['../']
}
}
});
},
};
export default config;
183 changes: 85 additions & 98 deletions storybook/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"name": "@vortexwest/storybook",
"version": "0.1.0",
"private": true,
"workspaces": [
"../packages/*"
],
"type": "module",
"scripts": {
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
Expand Down

0 comments on commit d5f7072

Please sign in to comment.