-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (39 loc) · 1.45 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
40
41
42
name: Deploy
on:
push:
# Reminder: Make sure the `branches` list only contain the name of main
# branch! Usually, the main branch name is either `master` or `main`.
# Check the list of branches of your repository via GitHub Web interface or
# use `git branch -av` command in your shell.
# This event trigger will only run the workflow whenever there are new
# commits pushed to the main branch. Therefore, the deployed app that
# will be accessed by users will be based on the latest version of the
# main branch.
branches:
- main
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: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
- name: Install dpl
run: gem install dpl
- name: Deploy to Heroku
run: dpl --provider=heroku --app=$HEROKU_APP_NAME --api-key=$HEROKU_API_KEY
- uses: chrnorm/deployment-action@releases/v1
name: Create GitHub deployment
with:
initial_status: success
token: ${{ github.token }}
# Assuming you are not using custom domain on Heroku, the target_url
# will contain the URL to your application hosted under Heroku's
# subdomain.
target_url: https://${{ secrets.HEROKU_APP_NAME }}.herokuapp.com
environment: production