-
Notifications
You must be signed in to change notification settings - Fork 17
49 lines (47 loc) · 1.14 KB
/
main.yml
File metadata and controls
49 lines (47 loc) · 1.14 KB
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
name: Test and Deploy
on:
push:
branches:
- master
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
- name: Install Dependencies
run: npm ci
- name: Test
run: npm test
- name: Build
run: npm run build
deploy:
name: Deploy
needs: test
runs-on: ubuntu-latest
steps:
- name: Prepare to Deploy
run: npm i vercel --no-save
- name: Checkout Repo
uses: actions/checkout@master
- name: Deploy
run: vercel --prod --confirm --token=${{ secrets.VERCEL_TOKEN }}
env:
VERCEL_ORG_ID: ${{ secrets.ORG_ID}}
VERCEL_PROJECT_ID: ${{ secrets.PROJECT_ID}}
coveralls:
name: Coveralls
needs: deploy
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
- name: Install Dependencies
run: npm ci
- name: Coverage
run: npm run coverage
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}