Skip to content

Commit

Permalink
fix: set environments in github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
froid1911 committed Feb 26, 2024
1 parent 23c36ba commit d1a5204
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 1 deletion.
50 changes: 50 additions & 0 deletions .github/workflows/build-and-deploy-prod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Deploy Switchboard Production

on:
push:
branches: [main]
jobs:
build:
environment: Production
runs-on: ubuntu-latest
steps:
# Check-out your repository.
- name: Checkout
uses: actions/checkout@v2

- name: Build, Push and Release API to Heroku. # Your custom step name
uses: gonuit/[email protected]
with:
email: ${{ secrets.HEROKU_EMAIL }}
heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
heroku_app_name: ${{ secrets.HEROKU_API_NAME }}
dockerfile_directory: ./api
dockerfile_name: Dockerfile
process_type: web
- name: Build, Push and Release Frontend to Heroku. # Your custom step name
uses: gonuit/[email protected]
with:
email: ${{ secrets.HEROKU_EMAIL }}
heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
heroku_app_name: ${{ secrets.HEROKU_FRONTEND_NAME }}
dockerfile_directory: ./frontend
dockerfile_name: Dockerfile
process_type: web
- name: Build, Push and Release Wundergraph to Heroku. # Your custom step name
uses: gonuit/[email protected]
with:
email: ${{ secrets.HEROKU_EMAIL }}
heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
heroku_app_name: ${{ secrets.HEROKU_WGRAPH_NAME }}
dockerfile_directory: ./wundergraph
dockerfile_name: Dockerfile
process_type: web
- name: Build, Push and Release NGINX to Heroku. # Your custom step name
uses: gonuit/[email protected]
with:
email: ${{ secrets.HEROKU_EMAIL }}
heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
heroku_app_name: ${{ secrets.HEROKU_NGINX_NAME }}
dockerfile_directory: ./nginx
dockerfile_name: Dockerfile
process_type: web
3 changes: 2 additions & 1 deletion .github/workflows/build-and-deploy-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ name: Deploy Switchboard Staging

on:
push:
branches: [main, staging]
branches: [staging]
jobs:
build:
environment: Staging
runs-on: ubuntu-latest
steps:
# Check-out your repository.
Expand Down

0 comments on commit d1a5204

Please sign in to comment.