Created
April 5, 2024 07:37
-
-
Save iflamed/6a45e66b018823d7881ae7b0117d4e94 to your computer and use it in GitHub Desktop.
deploy website with ssh in another user
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
ssh server "sudo su -c \"cd /var/www/sites/folder && git pull && npm install && npm run build\" serveruser" | |
ssh server "sudo supervisorctl restart servercmd" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment