Preprod deploy updated #264
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |