feat: validate deployment secrets and update SSH action version

This commit is contained in:
Asep Haryana Saputra
2026-05-22 21:33:32 +00:00
parent 1978597bcf
commit 64d63587c7
3 changed files with 425 additions and 34 deletions
+8 -1
View File
@@ -68,12 +68,19 @@ jobs:
contents: read
packages: read
steps:
- name: Validate deploy secrets
if: ${{ !secrets.VPS_HOST || !secrets.VPS_USER || !secrets.VPS_SSH_KEY }}
run: |
echo "Missing deploy secrets: VPS_HOST, VPS_USER, VPS_SSH_KEY." >&2
exit 1
- name: Deploy to VPS
uses: appleboy/ssh-action@master
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.VPS_HOST }}
username: ${{ secrets.VPS_USER }}
key: ${{ secrets.VPS_SSH_KEY }}
passphrase: ${{ secrets.VPS_SSH_PASSPHRASE }}
port: ${{ secrets.VPS_PORT || 22 }}
script: |
set -e