From 8545111cced4de64793c533c95574010ccd240e1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 28 Jul 2026 01:15:27 +0000 Subject: [PATCH 1/2] Initial plan From a4617dfd0cc6fba50ac6300372fabc7ddacf6a47 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 28 Jul 2026 01:18:40 +0000 Subject: [PATCH 2/2] fix: add secrets validation step and harden deploy workflow --- .github/workflows/deploy.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 92e8cd6..c594894 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -10,6 +10,22 @@ jobs: name: Deploy to VPS runs-on: ubuntu-latest steps: + - name: Validate required secrets + run: | + missing=() + [[ -z "$VPS_HOST" ]] && missing+=(VPS_HOST) + [[ -z "$VPS_USER" ]] && missing+=(VPS_USER) + [[ -z "$VPS_SSH_KEY" ]] && missing+=(VPS_SSH_KEY) + if [[ ${#missing[@]} -gt 0 ]]; then + echo "::error::Required secrets are not set: ${missing[*]}" + echo "Configure them in Settings → Secrets and variables → Actions" + exit 1 + fi + env: + VPS_HOST: ${{ secrets.VPS_HOST }} + VPS_USER: ${{ secrets.VPS_USER }} + VPS_SSH_KEY: ${{ secrets.VPS_SSH_KEY }} + - name: Deploy over SSH uses: appleboy/ssh-action@v1.2.0 with: @@ -21,5 +37,5 @@ jobs: script_stop: true script: | set -euo pipefail - cd ${{ secrets.VPS_APP_DIR }} + cd ~/apps/eventshare bash scripts/deploy-prod.sh