Skip to content

Commit

Permalink
Stop service before uploading, and overwrite with new binary
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelclapham authored Sep 7, 2024
1 parent 27c7d50 commit 5cab814
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,17 @@ jobs:

- run: ls -l

- name: copy file via ssh password
- name: Stop service
uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
password: ${{ secrets.SSH_PASSWORD }}
port: ${{ secrets.SSH_PORT }}
script: sudo /usr/bin/systemctl stop qrsync_server


- name: Upload new binary
uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
Expand All @@ -45,8 +55,9 @@ jobs:
port: ${{ secrets.SSH_PORT }}
source: "qrsync-server"
target: /var/www/qrsync_server
overwrite: true

- name: executing remote ssh commands using password
- name: Restart service
uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
Expand Down

0 comments on commit 5cab814

Please sign in to comment.