ci: add specific_host input for multi-server deployment

This commit is contained in:
maltayyar2 2026-01-15 01:29:55 +03:00
parent 95f2a40cab
commit 307c688dfc
1 changed files with 7 additions and 1 deletions

View File

@ -18,12 +18,18 @@ on:
- preprod
- prod
default: 'dev'
specific_host:
description: 'Specific Server IP (Optional)'
required: false
type: string
default: ''
force_restart:
description: 'Force Service Restart'
required: true
type: boolean
default: true
jobs:
deploy:
runs-on: ubuntu-latest
@ -83,7 +89,7 @@ jobs:
if: steps.context.outputs.ENV != ''
uses: appleboy/ssh-action@v1.0.0
with:
host: ${{ secrets.HYDRA_HOST }}
host: ${{ inputs.specific_host != '' && inputs.specific_host || secrets.HYDRA_HOST }}
username: ${{ secrets.HYDRA_USER }}
key: ${{ secrets.HYDRA_SSH_KEY }}
port: 22