Skip to content

Commit 996e9cf

Browse files
authored
Merge pull request #2144 from navikt/storybook-deployed
Deploy Storybook til GitHub Pages
2 parents 56d78dd + 7347b93 commit 996e9cf

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Deploy Storybook to github pages
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
packages: read
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Setup Pages
21+
uses: actions/configure-pages@v4
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v3
24+
with:
25+
node-version: '20'
26+
registry-url: 'https://npm.pkg.github.com'
27+
cache: 'npm'
28+
- name: Install dependencies
29+
run: npm ci
30+
env:
31+
NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
32+
- name: Build Storybook
33+
run: npm run build-storybook
34+
- name: Upload artifact
35+
uses: actions/upload-pages-artifact@v3
36+
with:
37+
path: ./storybook-static
38+
39+
deploy:
40+
runs-on: ubuntu-latest
41+
needs: build
42+
steps:
43+
- name: Deploy to GitHub Pages
44+
id: deployment
45+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)