forked from benfred/venn.js
-
-
Notifications
You must be signed in to change notification settings - Fork 3
46 lines (44 loc) · 1.31 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: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
- run: npm i -g yarn
- run: yarn config set checksumBehavior ignore
- name: Cache Node.js modules
uses: actions/cache@v4
with:
path: |
./.yarn/cache
./.yarn/unplugged
key: ${{ runner.os }}-yarn2-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn2-
- run: yarn install
- run: yarn build
- run: yarn lint
- run: yarn test
- uses: actions/upload-artifact@v4
if: failure()
with:
name: diff outputs
path: src/**/__diff_output__/*.png
- name: Prepare Deploy
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: |
mkdir -p public/build
cp README.md public/README.md
cp -r examples public/
cp build/venn.js public/build/
- name: Deploy
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
enable_jekyll: true