-
-
Notifications
You must be signed in to change notification settings - Fork 97
46 lines (46 loc) · 1.25 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
43
44
45
46
name: CI
on:
pull_request:
release:
types: [released]
workflow_dispatch:
inputs:
deploy:
required: false
type: boolean
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
# https://github.com/npm/cli/issues/3847
node-version: '16.1.0'
- run: npm install
- run: npm run setup
- run: npm run test --workspaces
- run: npm run coverage
- uses: coverallsapp/github-action@master
continue-on-error: true
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./coverage/lcov.info
deploy:
needs: test
if: startsWith(github.ref, 'refs/tags/') || github.event.inputs.deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '16.1.0'
- run: npm install
- run: npm run setup
- uses: peaceiris/actions-gh-pages@v2
env:
PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./packages/tweakpane/docs
with:
commitMessage: 'Deploy to GitHub Pages (Actions: ${{ github.sha }})'