Skip to content

Commit

Permalink
Migrate Heroku deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
textbook committed Aug 24, 2024
1 parent 32efe6c commit 2f0acff
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Deploy to Heroku

on:
workflow_call:
inputs:
environment:
required: true
type: string
secrets:
HEROKU_API_KEY:
required: true
HEROKU_EMAIL:
required: true

jobs:
deploy-heroku:
runs-on: ubuntu-22.04
environment:
name: ${{ inputs.environment }}
url: ${{ vars.HEROKU_APP_URL }}
steps:
- uses: actions/checkout@v4
- uses: akhileshns/[email protected]
with:
heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
heroku_app_name: ${{ vars.HEROKU_APP_NAME }}
heroku_email: ${{ secrets.HEROKU_EMAIL }}
11 changes: 11 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,14 @@ jobs:
PLAYWRIGHT_BASE_URL: http://localhost:4321
- if: always() && steps.docker-run.outputs.id
run: docker logs ${{ steps.docker-run.outputs.id }}
deploy:
uses: "./.github/workflows/deploy.yml"
if: github.ref == 'refs/heads/main'
needs:
- docker
- nodejs
with:
environment: heroku
secrets:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
HEROKU_EMAIL: ${{ secrets.HEROKU_EMAIL }}

0 comments on commit 2f0acff

Please sign in to comment.