1
1
mirror of https://github.com/primer/css.git synced 2024-11-25 18:26:14 +03:00
css/docs/script/build-storybook
Rez 40b9e1674c
add deployment workflows for GitHub Pages (#2038)
* add workflows

* change trigger to pull_request

* remove duplciate workflow stage name

* remove workflow trigger conditions

* switch to experimental workflow

* attempt restoring storybook environment

* fix build trigger

* apply correct storybook environment

* add deployments to permissions

* bump more permissions

* add ref

* another workaround

* change target_url to make deployment appear

* revert ref stuff
2022-04-19 16:26:47 -07:00

15 lines
442 B
Bash
Executable File

#!/bin/bash
set -e
# Add base url to be able to serve static files
if [ -n "$1" ]; then
echo '<base href="/storybook/" />' >> .storybook/manager-head.html
else
echo '<base href="/css/storybook/" />' >> .storybook/manager-head.html
fi
# Build storybook inside docs
./node_modules/.bin/build-storybook -o public/storybook -s public/static
# Remove manager-head after build to not interfere with dev builds
rm .storybook/manager-head.html