Deploy branch preview of storybook site to Pages #269
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy branch preview of storybook site to Pages | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
cache: npm | |
- name: Install dependencies | |
run: npm install | |
# if we don't do this, imports between packages will fail | |
# (e.g., import of Button from @ldn-viz/ui into @ldn-viz/charts) | |
- name: Build everything | |
run: npm run build | |
- name: Build storybook site | |
run: npm run build-storybook -w apps/docs | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-artifact | |
path: ./apps/docs/storybook-static | |
retention-days: 5 |