-
Notifications
You must be signed in to change notification settings - Fork 4
38 lines (38 loc) · 1.06 KB
/
heroku.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
on:
push:
branches:
- main
- deploy-with-actions
name: Deploy
concurrency: heroku
jobs:
custom-deploy:
name: "Deploy to Heroku"
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch full clone
- name: Install heroku CLI
run: |
curl https://cli-assets.heroku.com/install-ubuntu.sh | sh
- name: Heroku login credentials
run: |
cat > ~/.netrc <<EOF
machine api.heroku.com
login $HEROKU_EMAIL
password $HEROKU_API_KEY
machine git.heroku.com
login $HEROKU_EMAIL
password $HEROKU_API_KEY
EOF
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
HEROKU_EMAIL: ${{ secrets.HEROKU_EMAIL }}
- name: Add Heroku remote
run: heroku git:remote --app $HEROKU_APP_NAME
env:
HEROKU_APP_NAME: ${{ secrets.HEROKU_APP_NAME }}
- name: Push to Heroku
run: git push heroku