Skip to content

Commit

Permalink
fix!: Distinguish between "Pleo" env and Github env in deployment (#267)
Browse files Browse the repository at this point in the history
  • Loading branch information
macko911 authored Oct 28, 2024
1 parent eddf2d0 commit 158c9ef
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ on:
inputs:
environment:
required: true
description: "Name of the deployment environment"
description: "Name of the deployment environment (product-{dev|staging|production})"
type: string
github_environment:
required: true
description: "Name of the Github deployment environment ({app_name}-{environment})"
type: string
app_name:
required: false
Expand Down Expand Up @@ -61,7 +65,7 @@ jobs:
name: Deploy
runs-on: ubuntu-22.04
environment:
name: ${{ inputs.environment }}
name: ${{ inputs.github_environment }}
url: ${{ steps.deployment-url.outputs.url }}
outputs:
deployment_url: ${{ steps.deployment-url.outputs.url }}
Expand Down Expand Up @@ -148,9 +152,9 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.GH_REGISTRY_NPM_TOKEN }}
SPA_ROOT_DIR: ${{ inputs.root_dir }}
SPA_BUNDLE_DIR: ${{ inputs.bundle_dir }}
SPA_ENV: ${{inputs.environment}}
SPA_ENV: ${{ inputs.environment }}
SPA_TREE_HASH: ${{ inputs.deploy_hash }}
run: ${{inputs.inject_config_cmd }}
run: ${{ inputs.inject_config_cmd }}

- name: Copy Static Files
if: ${{ steps.is-version-already-deployed.outputs.is_deployed == 'false'}}
Expand Down
12 changes: 8 additions & 4 deletions reusable-workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ on:
inputs:
environment:
required: true
description: "Name of the deployment environment"
description: "Name of the deployment environment (product-{dev|staging|production})"
type: string
github_environment:
required: true
description: "Name of the Github deployment environment ({app_name}-{environment})"
type: string
app_name:
required: false
Expand Down Expand Up @@ -61,7 +65,7 @@ jobs:
name: Deploy
runs-on: ubuntu-22.04
environment:
name: ${{ inputs.environment }}
name: ${{ inputs.github_environment }}
url: ${{ steps.deployment-url.outputs.url }}
outputs:
deployment_url: ${{ steps.deployment-url.outputs.url }}
Expand Down Expand Up @@ -148,9 +152,9 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.GH_REGISTRY_NPM_TOKEN }}
SPA_ROOT_DIR: ${{ inputs.root_dir }}
SPA_BUNDLE_DIR: ${{ inputs.bundle_dir }}
SPA_ENV: ${{inputs.environment}}
SPA_ENV: ${{ inputs.environment }}
SPA_TREE_HASH: ${{ inputs.deploy_hash }}
run: ${{inputs.inject_config_cmd }}
run: ${{ inputs.inject_config_cmd }}

- name: Copy Static Files
if: ${{ steps.is-version-already-deployed.outputs.is_deployed == 'false'}}
Expand Down

0 comments on commit 158c9ef

Please sign in to comment.