-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (39 loc) · 1.33 KB
/
pipeline.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
name: Deployment Pipeline
on:
push:
branches:
- main
pull_request:
branches: [main]
types: [opened, synchronize]
jobs:
simplePipeline:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: npm install
# the "echo" command in the next line is a workaround for a bug in the dependecy tree caused by babel-jest
# see more https://stackoverflow.com/a/57089043/12019806
run: npm ci && cd client && echo SKIP_PREFLIGHT_CHECK=true >> .env && npm ci cd ..
- name: Backend Test
run: npm run test
env:
MONGODB_URI_TEST: ${{secrets.MONGODB_URI_TEST}}
SECRET: ${{secrets.SECRET}}
- name: ESlint
run: npm run lint && cd client && npm run lint && cd ..
- name: Build
run: npm run build:ui
- name: Deploy to Heroku
if: ${{ github.event_name == 'push' }}
uses: akhileshns/[email protected]
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "pure-headland-21885"
heroku_email: "[email protected]"
healthcheck: "https://pure-headland-21885.herokuapp.com/health"
checkstring: "ok"
rollbackonhealthcheckfailed: true