Skip to content

Commit

Permalink
fix: update vite config in production to correctly serve static files (
Browse files Browse the repository at this point in the history
…#427)

* fix: update vite config in production to correctly serve static files

* fix: update ci workflow to run tests in subdirectory

* fix: set specific url in test runner ci

* test: sanity-checking

* fix: building to base path only for github pages
  • Loading branch information
ergusto authored Apr 16, 2024
1 parent 49d7c35 commit d2b0c88
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- run: npm ci
- run: npm run build-storybook
- run: BASE_PATH=/quantum npm run build-storybook
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
Expand Down
15 changes: 9 additions & 6 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as path from 'path';
import type { StorybookConfig } from '@storybook/react-vite';
import * as path from 'path'
import type { StorybookConfig } from '@storybook/react-vite'

const config: StorybookConfig = {
stories: [
Expand All @@ -25,10 +25,13 @@ const config: StorybookConfig = {
config.resolve.alias = {
...config.resolve.alias,
'@': path.join(__dirname, '../src')
};
}
}

return config;
config.base = process.env.BASE_PATH || config.base

return config
}
};
export default config;
}

export default config

0 comments on commit d2b0c88

Please sign in to comment.