-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (42 loc) · 1.03 KB
/
ci.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: CI
on:
push:
branches:
- main
paths-ignore:
- 'README.md'
pull_request:
paths-ignore:
- 'README.md'
jobs:
test:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 20
- name: Install dependencies
run: yarn install
- name: Build
run: yarn build
- name: Lint
run: yarn lint
- name: Docs
run: yarn gh-pages
- name: Test
run: node_modules/.bin/serve --listen 3000 gh-pages/ & yarn test
- name: Deploy docs
uses: peaceiris/actions-gh-pages@v3
if: github.event_name == 'push'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./gh-pages
- name: Publish npm
if: github.event_name == 'push'
run: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}