generated from pbp-fasilkom-ui/django-pbp-template
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (35 loc) · 1.04 KB
/
dpl.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
name: Deploy
on:
push:
branches-ignore:
- template
pull_request:
branches-ignore:
- template
jobs:
Deployment:
runs-on: ubuntu-latest
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
HEROKU_APP_NAME: ${{ secrets.HEROKU_APP_NAME }}
steps:
- uses: actions/checkout@v2
- name: Set up Ruby 2.7
uses: actions/setup-ruby@v1
with:
ruby-version: 2.7
- name: Install dpl
run: gem install dpl
- name: Install Heroku CLI
run: wget -qO- https://cli-assets.heroku.com/install-ubuntu.sh | sh
- name: Deploy to Heroku
run: dpl --provider=heroku --app=$HEROKU_APP_NAME --api-key=$HEROKU_API_KEY
- name: Run migrations on Heroku
run: heroku run --app $HEROKU_APP_NAME migrate
- uses: chrnorm/deployment-action@releases/v1
name: Create GitHub deployment
with:
initial_status: success
token: ${{ github.token }}
target_url: https://${{ secrets.HEROKU_APP_NAME }}.herokuapp.com
environment: production