-
Notifications
You must be signed in to change notification settings - Fork 24
32 lines (24 loc) · 871 Bytes
/
deploy.yml
File metadata and controls
32 lines (24 loc) · 871 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
name: Deploy to Heroku
on:
release:
types:
- created
jobs:
deploy:
runs-on: ubuntu-latest
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
HEROKU_APP_NAME: ${{ secrets.HEROKU_APP_NAME }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Log in to Heroku Container Registry
run: echo "$HEROKU_API_KEY" | /usr/bin/docker login --username=_ --password-stdin registry.heroku.com
- name: Build Docker image
run: docker build -t registry.heroku.com/$HEROKU_APP_NAME/web .
- name: Push Docker image to Heroku
run: docker push registry.heroku.com/$HEROKU_APP_NAME/web
- name: Install Heroku CLI
run: curl https://cli-assets.heroku.com/install.sh | sh
- name: Release on Heroku
run: heroku container:release web --app $HEROKU_APP_NAME