2022-05-11 20:29:31 -07:00
|
|
|
name: Build and Deploy Components+Style Guide
|
|
|
|
on:
|
|
|
|
push:
|
2022-09-05 12:33:01 -07:00
|
|
|
branches:
|
|
|
|
- webv2
|
2022-07-20 20:42:23 -07:00
|
|
|
paths: ['web/stories/**', 'web/components/**'] # Trigger the action only when files change in the folders defined here
|
2022-09-05 12:33:01 -07:00
|
|
|
|
2022-05-11 20:29:31 -07:00
|
|
|
jobs:
|
|
|
|
build-and-deploy:
|
|
|
|
runs-on: ubuntu-latest
|
2022-11-19 11:56:15 -08:00
|
|
|
if: github.repository == 'owncast/owncast'
|
|
|
|
|
2022-05-11 20:29:31 -07:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
ref: webv2 # Remove when webv2 gets merged into develop
|
|
|
|
|
|
|
|
- name: Install and Build
|
|
|
|
run: | # Install npm packages and build the Storybook files
|
|
|
|
cd web
|
2022-07-20 20:42:23 -07:00
|
|
|
npm install --include-dev --force
|
2023-01-26 14:18:07 -08:00
|
|
|
cd .storybook/tools
|
|
|
|
./generate-stories.sh
|
|
|
|
cd -
|
2022-05-11 20:29:31 -07:00
|
|
|
npm run build-storybook -- -o ../docs/components
|
|
|
|
|
2022-05-12 15:21:46 -07:00
|
|
|
- name: Dispatch event to web site
|
|
|
|
uses: peter-evans/repository-dispatch@v2
|
2022-05-12 15:12:01 -07:00
|
|
|
with:
|
2022-05-12 15:21:46 -07:00
|
|
|
token: ${{ secrets.BUNDLE_STORYBOOK_OWNCAST_ONLINE }}
|
2022-05-12 15:12:01 -07:00
|
|
|
repository: owncast/owncast.github.io
|
|
|
|
event-type: bundle-components-library
|