Skip to content

Commit 565d8fe

Browse files
committed
Fix storybook build without submodule
1 parent 10abb23 commit 565d8fe

File tree

1 file changed

+24
-17
lines changed

1 file changed

+24
-17
lines changed

.github/workflows/build_deploy.yml

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
branches:
66
- "6.0"
77

8+
env:
9+
node-version: 20.x
10+
811
jobs:
912
build_deploy:
1013
runs-on: ubuntu-latest
@@ -35,31 +38,35 @@ jobs:
3538
- name: Prepare deploy
3639
run: make deploy
3740

38-
# node setup
39-
- name: Use Node.js 16
41+
- name: Use Node.js ${{ env.node-version }}
4042
uses: actions/setup-node@v3
4143
with:
42-
node-version: '16'
43-
- name: Install Yarn
44-
run: npm install -g yarn
45-
# node cache
46-
- name: Get yarn cache directory path
47-
id: yarn-cache-dir-path
48-
working-directory: submodules/volto
49-
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
44+
node-version: ${{ env.node-version }}
45+
46+
- uses: pnpm/action-setup@v2
47+
name: Install pnpm
48+
with:
49+
version: 8
50+
run_install: false
51+
52+
- name: Get pnpm store directory
53+
shell: bash
54+
run: |
55+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
56+
5057
- uses: actions/cache@v3
51-
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
58+
name: Setup pnpm cache
5259
with:
53-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
54-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
60+
path: ${{ env.STORE_PATH }}
61+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
5562
restore-keys: |
56-
${{ runner.os }}-yarn-
63+
${{ runner.os }}-pnpm-store-
5764
5865
- name: StoryBook build
66+
working-directory: submodules/volto
5967
run: |
60-
cd submodules/volto
61-
yarn install --immutable
62-
yarn build-storybook -o ../../_build/html/storybook
68+
pnpm i
69+
make storybook-build
6370
6471
- name: Deploy to server
6572
id: deploy

0 commit comments

Comments
 (0)