-
Notifications
You must be signed in to change notification settings - Fork 5
45 lines (35 loc) · 1010 Bytes
/
integrate.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
name: Build, Test and deploy
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
test:
name: Test
runs-on: ubuntu-latest
env:
DATABASE: ${{secrets.DATABASE}}
NODE_ENV: ${{secrets.NODE_ENV}}
steps:
- uses: actions/checkout@v2
- name: Run tests
run: |
cd server
npm install
npm run setup_db_test
npm run test
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Add remote origin
run: git remote add heroku https://heroku:${{ secrets.HEROKU_API_KEY }}@git.heroku.com/${{ secrets.HEROKU_APP_NAME }}.git
- name: View remotes
run: git remote
- name: Deploy backend to heroku
#run: git subtree push --prefix server heroku master --force
run: git push --force heroku `git subtree split --prefix server HEAD`:master