-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (28 loc) · 860 Bytes
/
deploy.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
name: Build and Deploy
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Heroku CLI
run: curl https://cli-assets.heroku.com/install.sh | sh
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: _
password: ${{ secrets.HEROKU_API_KEY }}
registry: registry.heroku.com
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: registry.heroku.com/${{ secrets.HEROKU_APP_NAME }}/web
- name: Release Docker container on Heroku
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
run: heroku container:release web -a ${{ secrets.HEROKU_APP_NAME }}