Skip to content

Commit 9d6b5a0

Browse files
authored
Merge pull request plone#1187 from plone/storybookdeploy
Add storybook deployment
2 parents 7cb60aa + e67b6eb commit 9d6b5a0

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

.github/workflows/build_deploy.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,30 @@ jobs:
3030
- name: Prepare deploy
3131
run: make deploy
3232

33+
# node setup
34+
- name: Use Node.js ${{ matrix.node-version }}
35+
uses: actions/setup-node@v1
36+
working-directory: submodules/volto
37+
with:
38+
node-version: ${{ matrix.node-version }}
39+
40+
# node cache
41+
- name: Get yarn cache directory path
42+
id: yarn-cache-dir-path
43+
working-directory: submodules/volto
44+
run: echo "::set-output name=dir::$(yarn cache dir)"
45+
- uses: actions/cache@v1
46+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
47+
working-directory: submodules/volto
48+
with:
49+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
50+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
51+
restore-keys: |
52+
${{ runner.os }}-yarn-
53+
54+
- name: StoryBook build
55+
run: cd submodules/volto && yarn && yarn build-storybook -o _build/html/storybook
56+
3357
- name: Deploy to server
3458
id: deploy
3559
uses: Pendect/[email protected]

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,11 @@ netlify:
211211
git submodule update; \
212212
ln -s ../submodules/volto/docs/source ./docs/volto
213213
cd $(DOCS_DIR) && sphinx-build -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
214+
make storybook
215+
216+
.PHONY: storybook
217+
storybook:
218+
cd submodules/volto && yarn && yarn build-storybook -o ../../_build/html/storybook
214219

215220
.PHONY: all
216221
all: clean spellcheck linkcheck html ## Clean docs build, then run linkcheck and spellcheck, and build html

0 commit comments

Comments
 (0)