-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (35 loc) · 936 Bytes
/
main.yaml
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
name: Main
on:
push:
branches:
- 'main'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@master
with:
node-version: 20.9.0
- name: Install dependencies
run: npm install
- name: Run linter
run: npm run lint
- name: Perform build
run: npm run build
- name: Publish demo to github pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist/demo
- name: Publish to NPM if version has been updated
uses: pascalgn/[email protected]
with:
tag_name: "v%s"
tag_message: "v%s"
commit_pattern: "^Release (\\S+)"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}