-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (37 loc) · 1.03 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
name: build
on:
push:
branches:
- master
- production
pull_request:
types: [opened, synchronize, reopened]
jobs:
build_frontend:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- run: npm i --prefix frontend/
- run: cd frontend && npm run lint
- run: cd frontend && npm run test
build_backend:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- run: cp backend/.env.example backend/.env
- run: npm ci --prefix backend/
- run: cd backend && npm run lint
- run: cd backend && npm run test
deploy:
runs-on: ubuntu-20.04
needs: [build_backend, build_frontend]
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v2
- uses: akhileshns/[email protected]
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: ${{secrets.HEROKU_APP_NAME}}
heroku_email: ${{secrets.HEROKU_EMAIL}}
usedocker: true
dontautocreate: true