forked from carbon-design-system/carbon
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (48 loc) · 1.74 KB
/
deploy-react-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
name: Deploy React storybook to IBM Cloud
on:
workflow_dispatch:
push:
tags:
# Matches tags that have the shape `vX.Y.Z`. Reference:
# https://help.github.com/en/articles/workflow-syntax-for-github-actions#onpushpull_requesttagsbranches
- 'v[0-9]+.[0-9]+.[0-9]+'
# Ignore tags that use a preid after `vX.Y.Z`, for example: vX.Y.Z-alpha.0
# https://help.github.com/en/articles/workflow-syntax-for-github-actions#example-using-positive-and-negative-patterns
- '!v[0-9]+.[0-9]+.[0-9]+-*'
- '!v10*'
jobs:
build:
runs-on: macos-11
steps:
- uses: actions/checkout@main
- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: Install dependencies
run: yarn install --immutable --immutable-cache
- name: Build project
run: yarn build
- name: Install ibmcloud CLI
run: curl -fsSL https://clis.cloud.ibm.com/install/osx | sh
- name: Login to IBM Cloud
env:
CLOUD_API_KEY: ${{ secrets.CLOUD_API_KEY}}
run: |
ibmcloud login \
-a 'https://cloud.ibm.com' \
--apikey "$CLOUD_API_KEY" \
-r 'us-south'
ibmcloud target -o 'carbon-design-system' -s 'production'
- name: Install IBM Cloud plugins
run: |
ibmcloud cf install
ibmcloud cf add-plugin-repo CF-Community https://plugins.cloudfoundry.org
ibmcloud cf install-plugin blue-green-deploy -f -r CF-Community
- name: Deploy React storybook
run: |
cd packages/react
yarn build-storybook
ibmcloud cf blue-green-deploy carbon-storybook \
-f manifest.yml \
--delete-old-apps