Skip to content

Commit

Permalink
Create deployment.yml
Browse files Browse the repository at this point in the history
Add this to restart without password
%<yourusergroup> ALL=(ALL) NOPASSWD: /bin/systemctl restart <servicename>
  • Loading branch information
baidakovil authored Dec 8, 2023
1 parent 2371334 commit 7928505
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Deployment

on:
workflow_dispatch:

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: executing deployment script
uses: appleboy/ssh-action@v0.1.10
with:
host: ${{ secrets.DEPLOYMENT_HOST }}
username: ${{ secrets.DEPLOYMENT_USERNAME }}
password: ${{ secrets.DEPLOYMENT_PASSWORD }}
script: cd $HOME/${{ secrets.DEPLOYMENT_FOLDER }} && git pull && sudo systemctl restart ${{ secrets.DEPLOYMENT_SERVICE }}

0 comments on commit 7928505

Please sign in to comment.