-
-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (41 loc) · 1.1 KB
/
api.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
50
51
52
53
54
55
name: Api Build & Test & Deploy
on:
push:
branches: [ master ]
paths: [ 'api/**/*' ]
jobs:
build-api:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./api
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.17.2'
- run: go build .
deploy-api:
needs: [build-api]
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./api
steps:
- uses: actions/checkout@v2
- uses: akhileshns/[email protected]
with:
heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
heroku_app_name: "ytmparty-api"
heroku_email: ${{ secrets.HEROKU_EMAIL }}
appdir: "api"
announce-api:
needs: [deploy-api]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: appleboy/discord-action@master
with:
webhook_id: ${{ secrets.WEBHOOK_ID }}
webhook_token: ${{ secrets.WEBHOOK_TOKEN }}
args: "Api pipeline successfully passed. Deployed to heroku."