forked from trezor/trezor-suite
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (51 loc) · 1.88 KB
/
build-storybook.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
name: "[Build] components storybook"
permissions:
id-token: write # for fetching the OIDC token
contents: read # for actions/checkout
# run only once a day
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
env:
DEV_SERVER_URL: "https://dev.suite.sldev.cz"
jobs:
build-storybook:
if: github.repository == 'trezor/trezor-suite'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure aws credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::538326561891:role/gh_actions_trezor_suite_dev_deploy
aws-region: eu-central-1
- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: yarn
- name: Install dependencies
run: |
echo -e "\nenableScripts: false" >> .yarnrc.yml
echo -e "\nenableHardenedMode: false" >> .yarnrc.yml
yarn workspaces focus @trezor/components
yarn workspaces focus @trezor/product-components
- name: Build storybook
env:
ASSET_PREFIX: /components/develop
run: |
yarn workspace @trezor/components storybook-build
- name: Build product-components storybook
env:
ASSET_PREFIX: /product-components/develop
run: |
yarn workspace @trezor/product-components storybook-build
- name: Upload suite storybook to dev.suite.sldev.cz
env:
COMPONENTS_DEPLOY_PATH: s3://dev.suite.sldev.cz/components/develop
PRODUCT_COMPONENTS_DEPLOY_PATH: s3://dev.suite.sldev.cz/product-components/develop
run: |
aws s3 sync --delete ./packages/components/.build-storybook ${COMPONENTS_DEPLOY_PATH}
aws s3 sync --delete ./packages/product-components/.build-storybook ${PRODUCT_COMPONENTS_DEPLOY_PATH}