Jeremy Luscombe

Bash function to npm build and deploy to server

Here is the single command I use to deploy this site to my Vultr VPS:

npm run build && scp -r _site/* root@yourserver.com:/var/www/your-awesome-website.com

Add it as a vps-deploy alias (as an example) to .bashrc and it builds and deploys to the VPS consecutively.