Skip to content

Instantly share code, notes, and snippets.

@iflamed
Created April 5, 2024 07:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iflamed/6a45e66b018823d7881ae7b0117d4e94 to your computer and use it in GitHub Desktop.
Save iflamed/6a45e66b018823d7881ae7b0117d4e94 to your computer and use it in GitHub Desktop.
deploy website with ssh in another user
#!/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