ci: add SSH secret test workflow
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Failing after 211h19m26s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 211h19m30s

This commit is contained in:
2026-06-30 17:35:02 +08:00
parent 6aa40c9296
commit 8a630e0ae1
+26
View File
@@ -0,0 +1,26 @@
name: Test SSH Secrets
on:
workflow_dispatch:
jobs:
test-ssh:
name: Test Staging SSH
runs-on: ubuntu-22.04
steps:
- name: Setup SSH key
shell: sh
run: |
mkdir -p ~/.ssh
echo "${{ secrets.STAGING_SSH_KEY }}" > ~/.ssh/staging_key
chmod 600 ~/.ssh/staging_key
echo "SSH key file created"
- name: Test SSH connection
shell: sh
run: |
ssh -i ~/.ssh/staging_key \
-o StrictHostKeyChecking=no \
-o ConnectTimeout=10 \
${{ secrets.STAGING_SSH_USER }}@${{ secrets.STAGING_SSH_HOST }} \
"echo 'SSH connection successful! Host: \$(hostname)'"