Skip to content

Commit

Permalink
chore: try playroom and storybook deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
DSil committed Jan 15, 2025
1 parent a48bd0d commit abe94ef
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ jobs:
- name: Build tailwind
run: yarn tailwind-preset build

- name: Build Orbit components
run: yarn components build

- name: Build Playroom
run: yarn components build:playroom

- name: Build Storybook
run: yarn components build:storybook

Expand Down
1 change: 1 addition & 0 deletions packages/orbit-components/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
.out
.cache
.DS_STORE
.playroom
src/data/airportIllustrations.json
src/data/illustrations.json
src/data/icons.json
Expand Down
2 changes: 1 addition & 1 deletion packages/orbit-components/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function getAbsolutePath(value: string): string {
}

const config: StorybookConfig = {
staticDirs: [path.resolve(__dirname, "../static")],
staticDirs: [path.resolve(__dirname, "../static"), path.resolve(__dirname, "../.playroom")],
stories: ["../src/**/*.@(mdx|stories.*)"],
framework: getAbsolutePath("@storybook/react-webpack5"),

Expand Down
2 changes: 1 addition & 1 deletion packages/orbit-components/.storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const preview: Preview = {
element: ".story-content",
},
playroom: {
url: "http://localhost:9000",
url: "/playroom/",
},
},
};
Expand Down
3 changes: 2 additions & 1 deletion packages/orbit-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"scripts": {
"storybook": "storybook dev -p 6007 -c .storybook --ci",
"playroom:start": "playroom start",
"playroom": "playroom start",
"cy:dev": "vite cypress/integration --logLevel silent",
"cy:run": "start-server-and-test cy:dev http-get://localhost:3000 'cypress run'",
"cy:open": "start-server-and-test cy:dev http-get://localhost:3000 'cypress open'",
Expand All @@ -28,6 +28,7 @@
"build:iconsFont": "node --loader ts-node/esm config/createSVGFont.mts",
"build:emailIcons": "yarn build:icons && yarn build:iconsFont && node --loader ts-node/esm config/generateEmailIcons.mts",
"build:storybook": "yarn build:icons && storybook build -c .storybook -o .out",
"build:playroom": "playroom build",
"eslint:check": "eslint . --report-unused-disable-directives",
"test-ct": "playwright test -c playwright-ct.config.ts",
"deploy:storybook": "yarn storybook-to-ghpages -e ./.out",
Expand Down
4 changes: 2 additions & 2 deletions packages/orbit-components/playroom.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { defaultFoundation } = require("@kiwicom/orbit-design-tokens");
module.exports = {
title: "Orbit Playroom",
components: require.resolve("./playroomComponents.tsx"),
outputPath: "./.playroom",
outputPath: "./.playroom/playroom",
frameComponent: "./playroom/FrameComponent.tsx",
snippets: "./playroom/snippets.ts",
scope: "./playroom/scope.ts",
Expand All @@ -15,7 +15,7 @@ module.exports = {
defaultFoundation.breakpoint.mediumMobile,
defaultFoundation.breakpoint.desktop,
],
baseUrl: "/",
baseUrl: "/playroom/",
webpackConfig: () => ({
resolve: {
extensions: [".js", ".jsx", ".ts", ".tsx", ".css"],
Expand Down

0 comments on commit abe94ef

Please sign in to comment.