-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (47 loc) · 1.66 KB
/
build.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
name: Build and Deploy
# Controls when the action will run.
on:
# Triggers the workflow on push events for the master branch
push:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build-and-deploy:
if: "!startsWith(github.event.head_commit.message, 'WIP') && !startsWith(github.event.head_commit.message, 'chore(release)')"
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
# Runs a single command using the runners shell
- name: Use node.js
uses: actions/setup-node@v4
with:
node-version: "20.15.0"
# Runs a set of commands using the runners shell
- name: Install packages
run: |
yarn
# Build library
- name: Build library
run: |
yarn dist
# Collect test coverage
- name: Run coverage
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.COVERAGE_TOKEN }}
with:
coverageCommand: yarn test --coverage --json --outputFile=./.storybook/jest-test-results.json
# Runs a set of commands using the runners shell
- name: Build storybook
run: |
yarn build
# Push build folder to gh-pages
- name: Deploy to GitHub Pages
# You may pin to the exact commit or the version.
# uses: JamesIves/github-pages-deploy-action@5dc1d5a192aeb5ab5b7d5a77b7d36aea4a7f5c92
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: build