-
Notifications
You must be signed in to change notification settings - Fork 11
49 lines (38 loc) · 1.05 KB
/
build.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
name: Build/release
on: push
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: npm install
- run: npm run lint
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-version: 4.2
- name: Start Redis
uses: supercharge/[email protected]
with:
redis-version: 5
- run: cd app && yarn install
- run: cd app && yarn test
release:
needs: test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up npm
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install caprover
run: npm install -g caprover
- name: Caprover Deploy
run: caprover deploy -h 'https://captain.captain.sv.ufabcnext.com' -p '${{ secrets.CAPROVER_PASSWORD }}' -b 'master' -a 'api'