-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (53 loc) · 1.52 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Build and Deploy Storybook
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
name: Build all libs together
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Volta
uses: volta-cli/action@v4
- name: Install dependencies
run: yarn install --immutable
- name: Build all modules
run: yarn build
- name: Build Storybook
run: yarn run build-storybook
- name: Modify permissions
run: |
find dist/storybook -type d -exec chmod 755 {} \;
find dist/storybook -type d -exec chmod 555 {} \;
find dist/storybook -type f -exec chmod 744 {} \;
find dist/storybook -type f -exec chmod 644 {} \;
find dist/storybook -type f -exec chmod 444 {} \;
- name: Upload storybook artifact
uses: actions/[email protected]
with:
path: dist/storybook
deploy:
runs-on: ubuntu-latest
name: Publish Storybook
needs: build
steps:
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: github-pages
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
with:
token: ${{ github.token }}
artifact_name: github-pages