-
Notifications
You must be signed in to change notification settings - Fork 3
35 lines (33 loc) · 1 KB
/
production.yml
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
33
34
35
---
name: Production Deploy
on:
workflow_run:
workflows: [CI]
types: [completed]
branches: [release]
workflow_dispatch: # manual trigger
jobs:
# runs if CI workflow was successful OR if this was manually triggered
on-success:
runs-on: ubuntu-22.04
if: >
github.event_name == 'workflow_dispatch' ||
github.event.workflow_run.conclusion == 'success'
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
with:
ref: release
- uses: akhileshns/heroku-deploy@e86b991436e126ff9d78399b801a6610a64881c9
with:
heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
heroku_app_name: "ocw-studio"
heroku_email: ${{ secrets.HEROKU_EMAIL }}
branch: release
# runs ONLY on a failure of the CI workflow
on-failure:
runs-on: ubuntu-22.04
if: >
github.event_name == 'workflow_dispatch' ||
github.event.workflow_run.conclusion == 'failure'
steps:
- run: echo 'The triggering workflow failed'