Skip to content

gha deploy test

gha deploy test #5

Workflow file for this run

name: Build and Deploy
on:
push:
branches:
- main
env:
HEROKU_APP_NAME: ${{ secrets.HEROKU_APP_NAME }}
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Log in to Heroku
run: |
echo "$HEROKU_API_KEY" | heroku auth:token
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: _
password: $HEROKU_API_KEY
registry: registry.heroku.com
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: registry.heroku.com/$HEROKU_APP_NAME/web
- name: Release Docker container on Heroku
run: heroku container:release web -a $HEROKU_APP_NAME