-
Notifications
You must be signed in to change notification settings - Fork 66
70 lines (68 loc) · 1.93 KB
/
publish_storybook_lab.yaml
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
65
66
67
68
69
70
name: Publish lab storybook
on:
workflow_dispatch:
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
jobs:
setup:
uses: equinor/design-system/.github/workflows/_setup.yml@develop
secrets: inherit
with:
cacheKey: ${{ github.sha }}
checkout_paths: packages/*
packages:
name: Process packages
runs-on: ubuntu-latest
needs: [setup]
steps:
- name: Use "setup" cache
id: get-setup-cache
uses: actions/cache@v3
with:
path: |
./*
~/.pnpm-store
key: ${{ github.sha }}
- name: Use "dist" cache
id: use-dist-cache
uses: actions/cache@v3
with:
path: |
./*
~/.pnpm-store
key: ${{ github.sha }}-dist-production-lab-storybook
- name: Build packages
id: build-packages
run: node_modules/.bin/pnpm run build
- name: Build Storybook
id: build-storybook
run: |
echo Running build:storybook:lab!
node_modules/.bin/pnpm build:storybook:lab
publish-storybook:
needs: [setup, packages]
name: Build & Deploy Website
runs-on: ubuntu-latest
steps:
- name: Use cache with storybook files
id: use-cache-storybook
uses: actions/cache@v3
with:
path: |
./*
~/.pnpm-store
key: ${{ github.sha }}-dist-production-lab-storybook
- name: Deploy the website
id: deploy-website
uses: tibor19/static-website-deploy@v2
with:
enabled-static-website: 'true'
folder: 'packages/eds-lab-react/storybook-build'
public-access-policy: 'container'
connection-string: ${{ secrets.AZ_STORAGE_STORYBOOK_LAB_CONNECTION_STRING }}
- name: log-errors-to-slack
uses: act10ns/slack@v2
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
if: failure()