Skip to content

Commit

Permalink
[Issue: 1291] Update cd-* scripts to deploy staging (#1821)
Browse files Browse the repository at this point in the history
## Summary
Fixes #1291
Fixes #1549 

### Time to review: __1 min__

## Changes proposed
* add `staging` input to `cd-api` and `cd-frontend` files

## Context for reviewers
> The cd files need to be configured to also deploy the staging
environment

## Additional information
N/A
  • Loading branch information
aplybeah authored Apr 30, 2024
1 parent fbf5100 commit a385b89
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cd-analytics.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Deploy Analytics
# Need to set a default value for when the workflow is triggered from a git push
# which bypasses the default configuration for inputs
run-name: Deploy ${{ github.ref_name }} to Analytics ${{ inputs.environment || (github.event_name == 'release' && 'prod') || 'dev' }}
run-name: Deploy ${{ github.ref_name }} to Analytics ${{ inputs.environment || (github.event_name == 'release' && 'prod') || fromJSON('["dev", "staging"]')}}

on:
push:
Expand Down Expand Up @@ -35,4 +35,4 @@ jobs:
uses: ./.github/workflows/deploy.yml
with:
app_name: "analytics"
environment: ${{ inputs.environment || (github.event_name == 'release' && 'prod') || 'dev' }}
environment: ${{ inputs.environment || (github.event_name == 'release' && 'prod') || fromJSON('["dev", "staging"]') }}
5 changes: 3 additions & 2 deletions .github/workflows/cd-api.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Deploy API
# Need to set a default value for when the workflow is triggered from a git push
# which bypasses the default configuration for inputs
run-name: Deploy ${{ github.ref_name }} to API ${{ inputs.environment || (github.event_name == 'release' && 'prod') || 'dev' }}
run-name: Deploy ${{ github.ref_name }} to API ${{ inputs.environment || (github.event_name == 'release' && 'prod') || fromJSON('["dev", "staging"]') }}

on:
push:
Expand All @@ -20,6 +20,7 @@ on:
type: choice
options:
- dev
- staging
- prod

jobs:
Expand All @@ -33,4 +34,4 @@ jobs:
uses: ./.github/workflows/deploy.yml
with:
app_name: "api"
environment: ${{ inputs.environment || (github.event_name == 'release' && 'prod') || 'dev' }}
environment: ${{ inputs.environment || (github.event_name == 'release' && 'prod') || fromJSON('["dev", "staging"]') }}
6 changes: 3 additions & 3 deletions .github/workflows/cd-frontend.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: Deploy Frontend
# Need to set a default value for when the workflow is triggered from a git push
# which bypasses the default configuration for inputs
run-name: Deploy ${{ github.ref_name }} to Frontend ${{ inputs.environment || (github.event_name == 'release' && 'prod') || 'dev' }}

run-name: Deploy ${{ github.ref_name }} to Frontend ${{ inputs.environment || (github.event_name == 'release' && 'prod') || fromJSON('["dev", "staging"]') }}
on:
push:
branches:
Expand All @@ -20,6 +19,7 @@ on:
type: choice
options:
- dev
- staging
- prod

jobs:
Expand All @@ -33,4 +33,4 @@ jobs:
uses: ./.github/workflows/deploy.yml
with:
app_name: "frontend"
environment: ${{ inputs.environment || (github.event_name == 'release' && 'prod') || 'dev' }}
environment: ${{ inputs.environment || (github.event_name == 'release' && 'prod') || fromJSON('["dev", "staging"]') }}

0 comments on commit a385b89

Please sign in to comment.