-
Notifications
You must be signed in to change notification settings - Fork 66
47 lines (39 loc) · 1.41 KB
/
storybook-deploy.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
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
#
# OpenCRVS is also distributed under the terms of the Civil Registration
# & Healthcare Disclaimer located at http://opencrvs.org/license.
#
# Copyright (C) The OpenCRVS Authors located at https://github.com/opencrvs/opencrvs-core/blob/master/AUTHORS.
name: Build and Deploy Storybook to Cloudflare Pages
on:
push:
branches:
- master
- develop
- release-v*
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
repository: 'opencrvs/opencrvs-core'
- name: Set up Node.js
uses: actions/setup-node@v3
with:
cache: 'yarn'
- name: Install dependencies
run: yarn install
# @TODO: when Yarn 2 is available
# run: yarn workspaces focus --production @opencrvs/components
- name: Build components
run: cd packages/components && yarn build
- name: Build Storybook
run: cd packages/components && yarn build-storybook
- name: Deploy
run: npx wrangler pages deploy ./packages/components/build --project-name opencrvs --branch ${{ github.ref_name }}
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}