-
Notifications
You must be signed in to change notification settings - Fork 4
51 lines (42 loc) · 1.1 KB
/
ci.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
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
environment: heroku
env:
SPRING_PROFILES_ACTIVE: dev
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Cache Gradle
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Set up Java 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Deploy to Heroku
env:
HEROKU_EMAIL: ${{secrets.HEROKU_EMAIL}}
HEROKU_TOKEN: ${{secrets.HEROKU_TOKEN}}
run: |
cat <<EOF >~/.netrc
machine api.heroku.com
login $HEROKU_EMAIL
password $HEROKU_TOKEN
EOF
./gradlew deployHeroku