Skip to content

Commit

Permalink
fix storybook static dir
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherChudzicki committed Jul 16, 2024
1 parent eef29da commit a6677d3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/publish-pages.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
on:
# Runs on pushes targeting the default branch
push:
branches: [main]
branches: [main, cc/fix-storybook-static-dir]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
env:
STORYBOOK_ROOT_URL: ${{ github.event.repository.name }}
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
Expand Down
4 changes: 3 additions & 1 deletion frontends/mit-open/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ const config = {
"../../ol-components/src/**/*.mdx",
"../../ol-components/src/**/*.stories.@(tsx|ts)",
],
staticDirs: [{ from: "../public", to: "/static" }],
staticDirs: [
{ from: "../public", to: `${process.env.STORYBOOK_ROOT_URL ?? ""}/static` },
],
addons: [
getAbsolutePath("@storybook/addon-links"),
getAbsolutePath("@storybook/addon-essentials"),
Expand Down

0 comments on commit a6677d3

Please sign in to comment.