-
Notifications
You must be signed in to change notification settings - Fork 4
48 lines (39 loc) · 1.31 KB
/
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
name: Publish Storybook
on:
push:
branches:
- master
workflow_dispatch:
jobs:
storybook:
name: Storybook
runs-on: ubuntu-latest
env:
GOOGLE_SERVICE_ACCOUNT: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Install dependencies
run: npm install
- name: Build
run: |
npm run build-storybook -- -o storybook-static/storybook
- name: Auth to Google Cloud
id: auth
if: ${{ always() && env.GOOGLE_SERVICE_ACCOUNT != 0 }}
uses: "google-github-actions/auth@v2"
with:
credentials_json: "${{ secrets.GOOGLE_SERVICE_ACCOUNT }}"
- name: "Set up Cloud SDK"
if: env.GOOGLE_SERVICE_ACCOUNT != 0
uses: "google-github-actions/setup-gcloud@v2"
- name: Publish storybook to Google Cloud
run: |
gsutil -m rsync -d -r storybook-static/storybook gs://internal-kestra-host/${{ format('{0}/{1}', github.repository, github.ref_name) }}
- name: Create commit comment
uses: peter-evans/commit-comment@v3
with:
body: |
Storybook published on
https://internal.dev.kestra.io/ui-libs/${{ github.ref_name }}/storybook
reactions: 'hooray'