Skip to content

Allow manual heroku deployment #81

Allow manual heroku deployment

Allow manual heroku deployment #81

Workflow file for this run

# Your workflow name.
name: Deploy to heroku.
# Run workflow on every push to master branch.
on:
push:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js environment to run migrations
uses: actions/setup-node@v3
with:
node-version: "18.x"
- name: Install dependencies and run migrations
working-directory: backend/
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
run: |
yarn install
npx prisma migrate deploy
- name: Build, Push and Release a Docker container to Heroku.
env:
ENV_FILE: ${{ secrets.ENV_FILE }}
uses: gonuit/heroku-docker-deploy@v1.3.3
with:
email: ${{ secrets.HEROKU_EMAIL }}
heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
heroku_app_name: ${{ secrets.HEROKU_APP_NAME }}
dockerfile_directory: backend/
dockerfile_name: Dockerfile.deploy
docker_options: "--platform linux/amd64 --env-file <(echo '$ENV_FILE')"
process_type: web