-
Notifications
You must be signed in to change notification settings - Fork 32
65 lines (64 loc) · 1.83 KB
/
push.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
name: CI/CD
on: push
jobs:
test:
name: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup
uses: actions/setup-node@v2
with:
node-version: '18.x'
- uses: actions/cache@v2
id: yarn-cache
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node_modules-
- name: Install
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install
- name: Lint
run: yarn lint
- name: Build
run: yarn build
- name: Types
run: yarn types
- name: Bundle
run: yarn bundle
- name: Bundle minified
run: NODE_OPTIONS="--max_old_space_size=4096" NODE_ENV=production yarn bundle
- name: Release
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn release
publish:
name: Publish
needs: test
if: contains(github.ref, 'refs/heads/master')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/cache@v2
id: yarn-cache
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node_modules-
- name: Build
run: yarn build
- name: Build storybook
run: yarn storybook:build
- name: Install Firebase
run: yarn global add firebase-tools
- name: Deploy storybook
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
run: yarn storybook:deploy --token "$FIREBASE_TOKEN"