fix deploy

This commit is contained in:
2026-03-01 00:14:40 +03:00
parent c3b75a0eb7
commit d963ea83ad

View File

@@ -17,10 +17,13 @@ on:
required: false required: false
type: string type: string
dry_run: dry_run:
description: 'Dry run (deploy only — no SSH, just show what would run)' description: 'Dry run (only for deploy — no SSH, only show planned steps)'
required: false required: true
type: boolean type: choice
default: false default: no
options:
- no
- yes
jobs: jobs:
deploy: deploy:
@@ -30,7 +33,7 @@ jobs:
github.event_name == 'push' || github.event_name == 'push' ||
(github.event_name == 'workflow_dispatch' && github.event.inputs.action == 'deploy') (github.event_name == 'workflow_dispatch' && github.event.inputs.action == 'deploy')
env: env:
DRY_RUN: ${{ github.event.inputs.dry_run == 'true' }} DRY_RUN: ${{ github.event.inputs.dry_run == 'yes' }}
concurrency: concurrency:
group: production-deploy-telegram-helper-bot group: production-deploy-telegram-helper-bot
cancel-in-progress: false cancel-in-progress: false
@@ -44,7 +47,7 @@ jobs:
ref: main ref: main
- name: Dry run (simulate deploy steps) - name: Dry run (simulate deploy steps)
if: github.event_name == 'workflow_dispatch' && github.event.inputs.dry_run == 'true' if: github.event_name == 'workflow_dispatch' && github.event.inputs.dry_run == 'yes'
run: | run: |
echo "🔍 DRY RUN — no SSH, no changes on server" echo "🔍 DRY RUN — no SSH, no changes on server"
echo "Would run on server:" echo "Would run on server:"
@@ -62,7 +65,7 @@ jobs:
fi fi
- name: Deploy to server - name: Deploy to server
if: github.event_name != 'workflow_dispatch' || github.event.inputs.dry_run != 'true' if: github.event_name != 'workflow_dispatch' || github.event.inputs.dry_run != 'yes'
uses: appleboy/ssh-action@v1.0.0 uses: appleboy/ssh-action@v1.0.0
with: with:
host: ${{ vars.SERVER_HOST || secrets.SERVER_HOST }} host: ${{ vars.SERVER_HOST || secrets.SERVER_HOST }}