Skip to content

Commit 8d8895c

Browse files
Add file to redirect from /primitives to /primitives/storybook (#921)
* add html file to redirect into storybook dir * fix url for preview storybook deplyopment
1 parent 0455f6f commit 8d8895c

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/workflows/deploy_preview.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,21 @@ jobs:
3131
id: deployment
3232
with:
3333
token: '${{ secrets.GITHUB_TOKEN }}'
34-
environment-url: ${{needs.deploy.outputs.deployment_url}}/storybook
34+
environment-url: ${{needs.deploy.outputs.deployment_url}}storybook
3535
environment: storybook-preview
3636
- name: Update deployment status (success)
3737
if: success()
3838
uses: chrnorm/deployment-status@v2
3939
with:
4040
token: '${{ secrets.GITHUB_TOKEN }}'
41-
environment-url: ${{needs.deploy.outputs.deployment_url}}/storybook
41+
environment-url: ${{needs.deploy.outputs.deployment_url}}storybook
4242
state: 'success'
4343
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
4444
- name: Update deployment status (failure)
4545
if: failure()
4646
uses: chrnorm/deployment-status@v2
4747
with:
4848
token: '${{ secrets.GITHUB_TOKEN }}'
49-
environment-url: ${{needs.deploy.outputs.deployment_url}}/storybook
49+
environment-url: ${{needs.deploy.outputs.deployment_url}}storybook
5050
state: 'failure'
5151
deployment-id: ${{ steps.deployment.outputs.deployment_id }}

docs/storybook/scripts/build-storybook

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@ mkdir -p ../public/storybook
1717

1818
# Remove manager-head after build to not interfere with dev builds
1919
rm .storybook/manager-head.html
20+
21+
# create file to redirect to storybook
22+
echo '<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0;url=/storybook/"></head></html>' > ../public/index.html

0 commit comments

Comments
 (0)