-
Notifications
You must be signed in to change notification settings - Fork 2
60 lines (48 loc) · 1.46 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: "Build, Publish, Deploy"
on:
push:
branches:
- master
jobs:
release:
name: "Build"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
- name: Setup Node.js environment
uses: actions/setup-node@v2.1.2
with:
node-version: 14
registry-url: https://registry.npmjs.org
- id: check
uses: EndBug/version-check@v1
with:
file-url: https://unpkg.com/mintflowui@latest/package.json
static-checking: localIsNew
- name: Install dependencies
run: npm install
if: steps.check.outputs.changed == 'true'
- name: build
run: npm run build
if: steps.check.outputs.changed == 'true'
- name: Publish
run: npm publish
if: steps.check.outputs.changed == 'true'
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Wait 10 seconds for npm publish
uses: whatnick/wait-action@master
if: steps.check.outputs.changed == 'true'
with:
time: '10s'
- name: Install dependencies
run: cd src/docs && npm install
- name: Generate
run: cd src/docs && npm run deploy
- name: Deploy docs to github pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./src/docs/dist
cname: mintflowui.com