Skip to content

Commit a98fee2

Browse files
committed
add ci for storybook build
1 parent fe1fcdd commit a98fee2

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

.github/workflows/ci.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Storybook PR Checks
2+
on:
3+
pull_request:
4+
branches:
5+
- master
6+
7+
env:
8+
PROJECT_TOKEN: ${{ secrets.PROJECT_TOKEN }}
9+
10+
jobs:
11+
smartui-gihub-action:
12+
name: Execute Storybook build
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v1
16+
17+
- name: Create commit status
18+
run: |
19+
API_HOST=https://api.github.com
20+
# Check out the PR branch
21+
git checkout $GITHUB_HEAD_REF
22+
# Get the commit ID of the last commit
23+
COMMIT_ID=$(git rev-parse HEAD)
24+
echo "Last commit ID of PR: $COMMIT_ID"
25+
GITHUB_URL=$API_HOST/repos/$GITHUB_REPOSITORY/statuses/$COMMIT_ID
26+
echo "GITHUB_URL: $GITHUB_URL"
27+
echo "GITHUB_URL=$GITHUB_URL" >> $GITHUB_ENV
28+
29+
- name: Install Dependencies
30+
run: |
31+
npm install
32+
npm install @lambdatest/smartui-storybook -g
33+
34+
- name: Create storybook static build
35+
run: npm run build-storybook
36+
37+
- name: Execute storybook build
38+
run: |
39+
smartui --version
40+
smartui config create .smartui.json
41+
smartui storybook ./storybook-static --config .smartui.json

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@
2121
npm-debug.log*
2222
yarn-debug.log*
2323
yarn-error.log*
24+
storybook-static
25+
.storybook

0 commit comments

Comments
 (0)