-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (70 loc) · 2.16 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Build Workflows for Outline.js
name: Storybook Template
# Controls when the action will run. Triggers the workflow on push or pull request
on:
# Which branches to test on push/merge.
push:
branches:
- main
# Which branches to test on pull request.
pull_request:
branches:
- main
- /^issue/
- /^task/
- /^feature/
- /^bug/
- /^test/
# The jobs for the build workflow.
jobs:
# Basic setup job to prepare codebase.
setup:
name: Install
runs-on: ubuntu-latest
container:
image: node:lts
# The steps for the setup job.
steps:
# @see https://github.com/marketplace/actions/checkout
- name: Checkout Codebase
uses: actions/checkout@v4
- name: Move to correct directory
run: cd packages/storybook
- name: Use local Yarn version
run: echo "$(pwd)/.yarn/releases" >> $GITHUB_PATH
# @see https://github.com/marketplace/actions/setup-node-js-environment
- uses: actions/setup-node@v4
with:
node-version-file: "packages/storybook/.nvmrc"
cache: "yarn"
- name: Initialize .npmrc
run: cat $NPM_CONFIG_USERCONFIG >> .npmrc
- name: Install Dependencies
run: yarn install
# Job to run build, and basic assurances the codebase is ready for additional processing.
build:
name: Build
runs-on: ubuntu-latest
container:
image: node:lts
needs: ["setup"]
# The steps for the setup job.
steps:
# @see https://github.com/marketplace/actions/checkout
- name: Checkout Codebase
uses: actions/checkout@v4
- name: Move to correct directory
run: cd packages/storybook
- name: Use local Yarn version
run: echo "$(pwd)/.yarn/releases" >> $GITHUB_PATH
# @see https://github.com/marketplace/actions/setup-node-js-environment
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "yarn"
- name: Initialize .npmrc
run: cat $NPM_CONFIG_USERCONFIG >> .npmrc
- name: Install Dependencies
run: yarn install
- name: Build Application
run: yarn build