From 9a003436b4e59657420ff948bdb4081ac27f0268 Mon Sep 17 00:00:00 2001 From: asepharyana Date: Fri, 10 Jul 2026 07:14:10 +0700 Subject: [PATCH] fix: skip deploy workflow when SSH secrets not configured --- .github/workflows/deploy-docker.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-docker.yml b/.github/workflows/deploy-docker.yml index 736b292..a6afa31 100644 --- a/.github/workflows/deploy-docker.yml +++ b/.github/workflows/deploy-docker.yml @@ -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