-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (45 loc) · 1.22 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
name: Workflow Main - On Push
on:
push:
branches: [main]
jobs:
setup:
name: preparing
runs-on: ubuntu-latest
continue-on-error: false
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: install packages using yarn.lock
run: |
yarn --frozen-lockfile
- name: Release
run: |
yarn release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_CI }}
- name: Prepare publish
run: |
yarn prepare-publish
- name: Publish
run: |
echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" >> ~/.npmrc
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Prepare publish docs
run: |
yarn prepare-publish-docs
- name: Publish docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GH_TOKEN_CI }}
publish_dir: ./example/storybook-static