GIT DEPLOYMENT server: create bare repo: terminal: $ mkdir -p ~/git/morado.dev $ cd ~/git/morado.dev $ git init --bare setup new hook[1]: terminal: $ cd ~/git/morado.dev $ cp hooks/post-update.sample hooks/post-receive $ nvim hooks/post-receive file: ~/git/morado.dev/hooks/post-receive content: #!/bin/bash GIT_DIR=$(dirname $(dirname $(readlink -f $0))) DEPLOY_DIR=/var/www/$(basename $GIT_DIR) git "--work-tree=${DEPLOY_DIR}" "--git-dir=${GIT_DIR}" checkout -f if hook file is created remember to chmod +x it. pm2 watch and autostart deno api[**]: terminal: pm2 start --interpreter="deno" --interpreter-args="run --allow-read --allow-write --allow-net --allow-env" --name api.morado.dev /var/www/morado.dev/api/main.ts --watch pm2 save pm2 startup local: git init project. terminal: $ cd morado.dev $ git init $ git add . $ git commit -m "add git-scm" $ git remote add production 134.209.124.192:~/git/morado.dev $ git push --set-upstream production main to bypass ssh passphrase: terminal: $ ssh-add --aple-use-keychain [1]https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks [*]https://stackoverflow.com/questions/62081683/how-to-use-deno-in-production [*]https://stackoverflow.com/questions/61763366/deno-how-to-substitute-npm-scripts-package-json