ci: fix SSH pipe drop on long nixos-rebuild, add workflow_dispatch
- Add ServerAliveInterval=30/ServerAliveCountMax=40 to prevent broken pipe during nixos-rebuild switch (up to 20min keepalive) - Remove continue-on-error so deploy failures are visible - Add workflow_dispatch trigger for manual reruns Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
331a4a4e88
commit
12db8cc6b4
@@ -5,6 +5,7 @@ on:
|
|||||||
branches: ['develop']
|
branches: ['develop']
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: ['develop']
|
branches: ['develop']
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -63,10 +64,14 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Deploy to server
|
- name: Deploy to server
|
||||||
continue-on-error: true
|
|
||||||
run: |
|
run: |
|
||||||
ssh -i ~/.ssh/deploy_key -o ConnectTimeout=15 -o StrictHostKeyChecking=accept-new root@167.235.70.37 \
|
ssh -i ~/.ssh/deploy_key \
|
||||||
'nixos-rebuild switch --flake github:IMPHNEN/imphnen-infrastructure#hetzner --refresh 2>&1 | tail -30'
|
-o ConnectTimeout=30 \
|
||||||
|
-o StrictHostKeyChecking=accept-new \
|
||||||
|
-o ServerAliveInterval=30 \
|
||||||
|
-o ServerAliveCountMax=40 \
|
||||||
|
root@167.235.70.37 \
|
||||||
|
'nixos-rebuild switch --flake github:IMPHNEN/imphnen-infrastructure#hetzner --refresh 2>&1 | tail -50'
|
||||||
|
|
||||||
- name: Cleanup
|
- name: Cleanup
|
||||||
if: always()
|
if: always()
|
||||||
|
|||||||
Reference in New Issue
Block a user