forked from huggingface/huggingface_hub
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (51 loc) · 1.34 KB
/
js-widgets-tests.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
54
55
56
57
58
59
60
name: JS Widgets
on:
push:
paths:
- "js/**"
- "!js/src/lib/interfaces/**"
pull_request:
paths:
- "js/**"
- "!js/src/lib/interfaces/**"
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 14
- working-directory: js
run: |
npm ci
- name: Check style
working-directory: js
run: |
npm run lint
- name: Check svelte
working-directory: js
run: |
npm run check
- name: Build front
working-directory: js
run: |
npm run build
# CD of static site
- name: Netlify install
working-directory: js
run: |
npm i netlify-cli
- name: Netlify find out whether push to prod
if: endsWith(github.ref, '/master')
run: |
echo "::set-env name=NETLIFY_EXTRA_FLAG::--prod"
- name: Netlify deploy
working-directory: js
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: 69b9df00-bfdd-4499-bd7f-6add4d703d99
run: |
npx netlify deploy --auth "$NETLIFY_AUTH_TOKEN" --dir ./build/ --site ${NETLIFY_SITE_ID} ${NETLIFY_EXTRA_FLAG}