@sikka/hawa 0.0.279 → 0.0.281
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
name: Build, Deploy Storybook and Publish to NPM
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
# setup_build:
|
|
9
|
+
# runs-on: ubuntu-latest
|
|
10
|
+
# steps:
|
|
11
|
+
# - name: Checkout repository
|
|
12
|
+
# uses: actions/checkout@v2
|
|
13
|
+
|
|
14
|
+
# - name: Setup Node.js v16
|
|
15
|
+
# uses: actions/setup-node@v2
|
|
16
|
+
# with:
|
|
17
|
+
# node-version: 16
|
|
18
|
+
|
|
19
|
+
# - name: Install dependencies
|
|
20
|
+
# run: |
|
|
21
|
+
# if [ -e 'package-lock.json' ]; then
|
|
22
|
+
# npm ci
|
|
23
|
+
# else
|
|
24
|
+
# npm install
|
|
25
|
+
# fi
|
|
26
|
+
|
|
27
|
+
build_storybook:
|
|
28
|
+
# needs: setup_build
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
steps:
|
|
31
|
+
- name: Checkout repository
|
|
32
|
+
uses: actions/checkout@v2
|
|
33
|
+
|
|
34
|
+
- name: Setup Node.js v16
|
|
35
|
+
uses: actions/setup-node@v2
|
|
36
|
+
with:
|
|
37
|
+
node-version: 16
|
|
38
|
+
|
|
39
|
+
- name: Install dependencies
|
|
40
|
+
run: |
|
|
41
|
+
if [ -e 'package-lock.json' ]; then
|
|
42
|
+
npm ci
|
|
43
|
+
else
|
|
44
|
+
npm install
|
|
45
|
+
fi
|
|
46
|
+
|
|
47
|
+
- name: Build Storybook
|
|
48
|
+
run: npm run build-storybook
|
|
49
|
+
|
|
50
|
+
deploy_storybook:
|
|
51
|
+
needs: build_storybook
|
|
52
|
+
runs-on: ubuntu-latest
|
|
53
|
+
steps:
|
|
54
|
+
- name: Checkout repository
|
|
55
|
+
uses: actions/checkout@v2
|
|
56
|
+
|
|
57
|
+
- name: Deploy to GitHub Pages
|
|
58
|
+
uses: JamesIves/github-pages-deploy-action@v4
|
|
59
|
+
with:
|
|
60
|
+
branch: gh-pages
|
|
61
|
+
folder: docs
|
|
62
|
+
token: ${{ secrets.GH_TOKEN }}
|
|
63
|
+
|
|
64
|
+
npm_publish:
|
|
65
|
+
# needs: setup_build
|
|
66
|
+
runs-on: ubuntu-latest
|
|
67
|
+
steps:
|
|
68
|
+
- name: Checkout repository
|
|
69
|
+
uses: actions/checkout@v2
|
|
70
|
+
|
|
71
|
+
- name: Setup Node.js v16
|
|
72
|
+
uses: actions/setup-node@v2
|
|
73
|
+
with:
|
|
74
|
+
node-version: 16
|
|
75
|
+
registry-url: https://registry.npmjs.org/
|
|
76
|
+
|
|
77
|
+
- name: Setup Node.js v16
|
|
78
|
+
uses: actions/setup-node@v2
|
|
79
|
+
with:
|
|
80
|
+
node-version: 16
|
|
81
|
+
|
|
82
|
+
- name: Install dependencies
|
|
83
|
+
run: |
|
|
84
|
+
if [ -e 'package-lock.json' ]; then
|
|
85
|
+
npm ci
|
|
86
|
+
else
|
|
87
|
+
npm install
|
|
88
|
+
fi
|
|
89
|
+
|
|
90
|
+
- name: Build Library
|
|
91
|
+
run: npm run build-lib
|
|
92
|
+
|
|
93
|
+
- name: Build Styles
|
|
94
|
+
run: npm run build:styles
|
|
95
|
+
|
|
96
|
+
- name: Generate Tailwind Styles
|
|
97
|
+
run: npm run generate-css
|
|
98
|
+
|
|
99
|
+
- name: Publish to NPM
|
|
100
|
+
run: npm publish
|
|
101
|
+
env:
|
|
102
|
+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
name: Hawa Build, Deploy, and Publish on Push
|
|
5
5
|
|
|
6
6
|
on:
|
|
7
|
-
push:
|
|
8
|
-
|
|
7
|
+
# push:
|
|
8
|
+
# branches: [main]
|
|
9
|
+
release:
|
|
10
|
+
types: [created]
|
|
9
11
|
|
|
10
12
|
jobs:
|
|
11
13
|
build:
|
|
@@ -23,21 +25,26 @@ jobs:
|
|
|
23
25
|
else
|
|
24
26
|
npm install
|
|
25
27
|
fi
|
|
26
|
-
npm run build-storybook
|
|
27
28
|
env:
|
|
28
29
|
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
29
30
|
|
|
30
31
|
# Deployment job
|
|
31
32
|
deploy:
|
|
33
|
+
runs-on: ubuntu-latest
|
|
32
34
|
environment:
|
|
33
35
|
name: github-pages
|
|
34
36
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
35
|
-
runs-on: ubuntu-latest
|
|
36
37
|
needs: build
|
|
37
38
|
steps:
|
|
38
39
|
- name: Deploy to GitHub Pages
|
|
39
40
|
id: deployment
|
|
40
41
|
uses: actions/deploy-pages@v2
|
|
42
|
+
# with:
|
|
43
|
+
# branch: gh-pages
|
|
44
|
+
# folder: docs
|
|
45
|
+
# - name: Deploy to GitHub Pages
|
|
46
|
+
# id: deployment
|
|
47
|
+
# uses: actions/deploy-pages@v2
|
|
41
48
|
|
|
42
49
|
# Publishing to NPM
|
|
43
50
|
publish:
|