feat: validate deployment secrets and update SSH action version
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user