Skip to content

Commit

Permalink
chore: Increase CI robustness by using Heroku CLI (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickevansuk authored Aug 7, 2024
1 parent 0b32e8c commit 6ac7cf6
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions .github/workflows/test-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout validator app
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: openactive/data-model-validator-site
path: data-model-validator-site

- name: Deploy validator app to Heroku
uses: behe/heroku-build@v1
fetch-depth: 0

- name: Setup Heroku authentication
uses: extractions/netrc@v2
with:
app-name: data-model-validator-staging
api-key: "${{secrets.HEROKU_API_KEY}}"
path: data-model-validator-site
machine: git.heroku.com
password: ${{ secrets.HEROKU_API_KEY }}

- name: Deploy validator app to Heroku
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
run: |
heroku git:remote --app data-model-validator-staging
git push heroku master
promote-site:
needs: deploy-site
Expand All @@ -113,9 +118,8 @@ jobs:
url: https://validator.openactive.io/
runs-on: ubuntu-latest
steps:
- name: Promote validator app to production
uses: tiltshift/heroku-promote-app@v1
with:
heroku_app_name: data-model-validator-staging
heroku_api_key: "${{secrets.HEROKU_API_KEY}}"
heroku_email: "services@openactive.io"
- name: Promote validator app to production
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
run: |
heroku pipelines:promote --app data-model-validator-staging

0 comments on commit 6ac7cf6

Please sign in to comment.