-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (36 loc) · 1003 Bytes
/
publish.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
name: Publish Project
on:
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Configure git user and email
run: |
git config --global user.name "jinzelin"
git config --global user.email "[email protected]"
- name: Install Dependencies
run: |
npm install yarn -g
yarn
- name: Publish to NPM
run: |
yarn build
npm set "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}"
npx lerna publish -y
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: build Doc
run: yarn doc:build
- name: Publish Doc
uses: JamesIves/github-pages-deploy-action@v4
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: docs
FOLDER: docs
CLEAN: true