Skip to content

Commit

Permalink
dbug
Browse files Browse the repository at this point in the history
  • Loading branch information
raed667 committed Dec 13, 2023
1 parent e75d160 commit 9a36c88
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ jobs:
run: yarn build

- name: Build example playgrounds
run: echo "SUB PATH IS $SUB_PATH" && yarn build:playgrounds -- -- --public-url=/recommend/pr-preview/pr-${{ github.event.number }}/demo/dist/
env:
SUB_PATH: /recommend/pr-preview/pr-${{ github.event.number }}/demo/dist/
run: yarn build:playgrounds -- -- --public-url=/recommend/pr-preview/pr-${{ github.event.number }}/demo/dist/

- name: Deploy preview
uses: rossjrw/pr-preview-action@v1
Expand Down
4 changes: 3 additions & 1 deletion examples/demo/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import '@algolia/ui-components-horizontal-slider-theme';
import './App.css';
import './Recommend.css';

const subPath = process.env.SUB_PATH;

const router = createBrowserRouter(
[
{
Expand All @@ -30,7 +32,7 @@ const router = createBrowserRouter(
],
{
// needed for github pages subdirectory
basename: process.env.SUB_PATH ?? '/',
basename: subPath ?? '/',
}
);

Expand Down

0 comments on commit 9a36c88

Please sign in to comment.