-
Notifications
You must be signed in to change notification settings - Fork 27
53 lines (41 loc) · 1.05 KB
/
node.js.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
name: Node.js CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v2
- name: Install
run: npm install
- name: Lint
run: npm run lint
- name: Test
run: npm run test
- name: Build
run: npm run build
- name: Generate license file
if: github.ref == 'refs/heads/main'
run: npm run generate-license-file
- name: Generate Service Worker
if: github.ref == 'refs/heads/main'
run: npm run generate-sw
- name: Add .nojekyll file
if: github.ref == 'refs/heads/main'
run: touch dist/.nojekyll
- name: Add CNAME file
if: github.ref == 'refs/heads/main'
run: echo 'paint.js.org' > CNAME
- name: Deploy
if: github.ref == 'refs/heads/main'
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: dist
clean: true