Skip to content

Allow us to close registration #95

Allow us to close registration

Allow us to close registration #95

Workflow file for this run

name: Heroku Deploy
on:
pull_request:
types: [closed]
branches:
- main
jobs:
heroku-deploy:
runs-on: ubuntu-latest
env:
# If we don't set this, the calls to `heroku` in
# `akhileshns/heroku-deploy` try to open up the browser to log in, and
# then fail.
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Deploy to Heroku staging
uses: akhileshns/heroku-deploy@v3.12.14
# `types: [closed]` above means that this step runs even when a PR is
# closed without merging.
# This `if` statement ensures we only run this step when the PR is merged.
if: ${{ github.event.pull_request.merged == true }}
with:
heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
heroku_app_name: hotline-webring-staging
heroku_email: ${{ secrets.HEROKU_EMAIL }}
dontuseforce: true
dontautocreate: true
- name: Deploy to Heroku production
uses: akhileshns/heroku-deploy@v3.12.14
# Only run for PRs that merge to the `main` branch
if: ${{ github.event.pull_request.base.ref == 'main' && github.event.pull_request.merged == true }}
with:
heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
heroku_app_name: hotline-webring-production
heroku_email: ${{ secrets.HEROKU_EMAIL }}
dontuseforce: true
dontautocreate: true