-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (35 loc) · 1.18 KB
/
build.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: build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn global add typescript
- run: yarn
- run: yarn lint:check
- run: yarn build
- run: | # the touch is needed so that underscored files work for GitHub Pages
yarn doc
touch ./build/doc/.nojekyll
- run: yarn coverage
# update code coverage in codecov.io
- uses: codecov/codecov-action@v1
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
with:
token: ${{ secrets.CODECOV_TOKEN }} # required, use a github secret for that
fail_ci_if_error: true # optional (default=false)
# publish documentation in gh-pages branch
- name: Deploy doc
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: ./build/doc