Make your workflow more convenient!
#!/usr/bin/bash
cd ~/software/my-code/personal-website &&
pnpm run build &&
scp -r ./dist serper:~/dist &&
ssh serper "rm -rvf ~/personal-web && mv -v ~/dist ~/personal-web"
note that serper is configured on
~/.ssh/config
file, see this post for how to configure it.
It's pretty simple script, if you have any suggestion, please leave a constructive comments ^^
I execute the script manually through a terminal, you might ask: "why not trigger it automatically on git hook or github CI/CD pipeline?" well... sometimes I don't want to auto build when commit or push changes to remote repository, and it's more convenient for me presonally to do it manually :)
You can fork the site from this github repository