mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 09:30:45 +00:00
Fix deploy environment name on push (#643)
## Description: Fix the environment so that it works correctly on push hook. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
This commit is contained in:
@@ -39,9 +39,23 @@ jobs:
|
||||
# Don't deploy on push if this is a fork
|
||||
if: ${{ github.event_name == 'workflow_dispatch' || github.repository == 'openfrontio/OpenFrontIO' }}
|
||||
# Use different logic based on event type
|
||||
name: Deploy to ${{ inputs.target_subdomain && format('{0}.{1}', inputs.target_subdomain, inputs.target_domain) || inputs.target_domain || 'openfront.dev' }}
|
||||
name: Deploy to ${{
|
||||
github.event_name == 'push'
|
||||
&& (github.ref_name == 'main' && 'openfront.dev'
|
||||
|| format('{0}.openfront.dev', github.ref_name))
|
||||
|| inputs.target_subdomain && format('{0}.{1}', inputs.target_subdomain, inputs.target_domain)
|
||||
|| inputs.target_domain
|
||||
|| 'openfront.dev'
|
||||
}}
|
||||
runs-on: ubuntu-latest
|
||||
environment: ${{ inputs.target_subdomain && format('{0}.{1}', inputs.target_subdomain, inputs.target_domain) || inputs.target_domain || 'openfront.dev' }}
|
||||
environment: ${{
|
||||
github.event_name == 'push'
|
||||
&& (github.ref_name == 'main' && 'openfront.dev'
|
||||
|| format('{0}.openfront.dev', github.ref_name))
|
||||
|| inputs.target_subdomain && format('{0}.{1}', inputs.target_subdomain, inputs.target_domain)
|
||||
|| inputs.target_domain
|
||||
|| 'openfront.dev'
|
||||
}}
|
||||
env:
|
||||
DOMAIN: ${{ inputs.target_domain || 'openfront.dev' }}
|
||||
SUBDOMAIN: ${{ github.event_name == 'push' && github.ref_name || inputs.target_subdomain || 'main' }}
|
||||
|
||||
Reference in New Issue
Block a user