-
Notifications
You must be signed in to change notification settings - Fork 3
37 lines (30 loc) · 974 Bytes
/
heroku-deploy.yaml
File metadata and controls
37 lines (30 loc) · 974 Bytes
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
name: Deploy to Heroku
on:
push:
branches:
- heroku
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Install Heroku CLI
run: |
npm install -g heroku
- name: Checkout repository
uses: actions/checkout@v4
- name: Login to Heroku Container Registry
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
run: heroku container:login
- name: Build and push Docker image
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
HEROKU_APP_NAME: ${{ secrets.HEROKU_APP_NAME }}
run: |
docker build -t registry.heroku.com/$HEROKU_APP_NAME/web .
docker push registry.heroku.com/$HEROKU_APP_NAME/web
- name: Release to Heroku
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
HEROKU_APP_NAME: ${{ secrets.HEROKU_APP_NAME }}
run: heroku container:release web -a $HEROKU_APP_NAME