Skip to content

Commit 80a6bb4

Browse files
committed
fix(ci): add contents write permission for Storybook gh-pages deploy
1 parent 799fb00 commit 80a6bb4

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

.github/workflows/storybook.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,17 @@ on:
44
push:
55
branches: [main]
66

7+
permissions:
8+
contents: write # push to gh-pages-storybook branch
9+
710
jobs:
811
build-and-deploy-storybook:
912
runs-on: ubuntu-latest
1013
steps:
1114
- name: Checkout 🛎️
12-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
1316
with:
14-
persist-credentials: false
17+
fetch-depth: 0
1518
- uses: pnpm/action-setup@v4
1619
with:
1720
version: 10.27.0
@@ -20,8 +23,8 @@ jobs:
2023
node-version: 22
2124
cache: 'pnpm'
2225
- name: Install and Build 🔧
23-
run: | # Install npm packages and build the Storybook files
24-
pnpm install
26+
run: |
27+
pnpm install --frozen-lockfile
2528
pnpm run build:storybook
2629
- name: Add .nojekyll file to static folder 📁
2730
run:
@@ -32,3 +35,4 @@ jobs:
3235
with:
3336
branch: gh-pages-storybook
3437
folder: storybook-static
38+
clean: true

0 commit comments

Comments
 (0)