File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Test SSH Connection
2+
3+ on :
4+ workflow_dispatch : # Manual trigger only
5+
6+ jobs :
7+ test-ssh :
8+ name : Test SSH Connection to Lightsail
9+ runs-on : ubuntu-latest
10+ environment : production
11+
12+ steps :
13+ - name : Test SSH Connection
14+ 15+ with :
16+ host : ${{ vars.LIGHTSAIL_PUBLIC_IP }}
17+ username : ${{ vars.LIGHTSAIL_USERNAME }}
18+ key : ${{ secrets.LIGHTSAIL_SSH_KEY }}
19+ port : 22
20+ script : |
21+ echo "🚀 SSH Connection successful!"
22+ echo "Server info:"
23+ uname -a
24+ echo ""
25+ echo "Current user: $(whoami)"
26+ echo "Current directory: $(pwd)"
27+ echo "Home directory: $HOME"
28+ echo ""
29+ echo "Docker status:"
30+ docker --version || echo "Docker not installed"
31+ echo ""
32+ echo "Docker Compose status:"
33+ docker compose version || echo "Docker Compose not installed"
34+ echo ""
35+ echo "Available disk space:"
36+ df -h /
37+ echo ""
38+ echo "Available memory:"
39+ free -h
40+ echo ""
41+ echo "✅ SSH test completed successfully!"
You can’t perform that action at this time.
0 commit comments