Skip to content

Commit ab1ff8c

Browse files
explodedclaude
andcommitted
Fix deployment: stop service before copying binary
The previous deploy was failing with "Text file busy" because the deploy script tried to cp the new binary over the running process. Add an SSH step to stop the moon service before running deploy-moon, so the binary is no longer in use when it gets replaced. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 81a9066 commit ab1ff8c

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,15 @@ jobs:
5757
target: "/tmp/moon-deploy"
5858
overwrite: true
5959

60+
- name: Stop service before deploy
61+
uses: appleboy/ssh-action@v1.0.3
62+
with:
63+
host: ${{ secrets.DEPLOY_HOST }}
64+
username: ${{ secrets.DEPLOY_USER }}
65+
key: ${{ secrets.DEPLOY_SSH_KEY }}
66+
port: ${{ secrets.DEPLOY_PORT || '22' }}
67+
script: sudo systemctl stop moon
68+
6069
- name: Install and restart service
6170
uses: appleboy/ssh-action@v1.0.3
6271
with:

0 commit comments

Comments
 (0)