forked from backstage/backstage
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (50 loc) · 1.81 KB
/
microsite-with-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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Deploy Microsite and Storybook
on:
push:
branches:
- master
paths:
- '.github/workflows/microsite-with-storybook-deploy.yml'
- 'packages/storybook/**'
- 'packages/core/src/**'
- 'microsite/**'
- 'docs/**'
jobs:
deploy-microsite-and-storybook:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
env:
CI: true
NODE_OPTIONS: --max-old-space-size=4096
steps:
- uses: actions/checkout@v2
- name: use node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/ # Needed for auth
# We avoid caching in this workflow, as we're running an install of both the top-level
# dependencies and the microsite. We leave it to the main master workflow to produce the
# cache, as that results in a smaller bundle.
- name: top-level yarn install
run: yarn install --frozen-lockfile
- name: microsite yarn install
run: yarn install --frozen-lockfile
working-directory: microsite
- name: build microsite
run: yarn build
working-directory: microsite
- name: build storybook
run: yarn workspace storybook build-storybook
- name: move storybook dist into microsite
run: mv packages/storybook/dist/ microsite/build/backstage/storybook
- name: Check the build output
run: ls microsite/build/backstage && ls microsite/build/backstage/storybook
- name: Deploy both microsite and storybook to gh-pages
uses: JamesIves/github-pages-deploy-action@3.4.2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: microsite/build/backstage