Do not encourage people to join in the <meta>
description if it's closed
#96
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |