-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (44 loc) · 1.45 KB
/
pipeline.yml
File metadata and controls
46 lines (44 loc) · 1.45 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
name: Deployment pipeline
on:
push:
branches:
- main
pull_request:
branches: [main]
types: [opened, synchronize]
jobs:
simple_deployment_pipeline:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: npm install
run: npm install
- name: lint
run: npm run lint
- name: e2e testing
uses: cypress-io/github-action@v2
env:
MONGODB_URI: ${{ secrets.MONGODB_URI }}
with:
command: npm run test:e2e
start: npm run start
wait-on: http://localhost:5000
- name: deploy
if: ${{ github.event_name == 'push' && !contains(join(github.event.commits.*.message, ''), '#skip') }}
uses: akhileshns/heroku-deploy@v3.12.12
with:
heroku_api_key: ${{secrets.HEROKU_API_SECRET}}
heroku_app_name: "fullstackopen-firstbackend"
heroku_email: "vilhelm.toivonen@gmail.com"
healthcheck: "https://fullstackopen-firstbackend.herokuapp.com/health"
checkstring: "1"
rollbackonhealthcheckfailed: true
- name: Bump version and push tag
if: ${{ github.event_name == 'push' && !contains(join(github.event.commits.*.message, ''), '#skip') }}
uses: anothrNick/github-tag-action@1.33.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEFAULT_BUMP: minor