fix: skip deploy workflow when SSH secrets not configured

This commit is contained in:
asepharyana
2026-07-10 07:14:17 +07:00
parent 5e190a16e5
commit 9a003436b4
+6 -1
View File
@@ -29,7 +29,12 @@ jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 30
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push' || github.event.workflow_run.conclusion == 'success'
if: >
(github.event_name == 'workflow_dispatch' || github.event_name == 'push' || github.event.workflow_run.conclusion == 'success')
&& secrets.SSH_PRIVATE_KEY != ''
&& secrets.VPS_HOST != ''
&& secrets.VPS_USER != ''
&& secrets.VPS_TARGET_DIR != ''
steps:
- name: Checkout repository
uses: actions/checkout@v6