SYSTEM INFORMATION | |
---|---|
OS type and version | Ubuntu 20.04 |
Virtualmin version | 7.1-1 Pro |
Hey folks,
noob question… is there something special that I need to do in order to git push a website from test server to prod sever (both Vmin virtual servers)
I am asking because, my current git push seems correct. I get no errors at all… but at last, the pushed files do not actually appear in the targeted directories.
feel free to smack me about if I am missing something obvious:
I think that the --work-tree
git flag gets ignored, so pushed files never get put in the correct place
in my /home/username/public_html/production-site.git/hooks/push-receiver.sh
bash script I have:
#!/bin/bash
#Set Receiving & Working directories
git --work-tree=/home/username/public_html --git-dir=/home/username/public_html/production-site.git checkout -f
executable
username@admin:~/public_html/production-site.git$ stat hooks/push-receiver.sh
File: hooks/push-receiver.sh
Size: 165 Blocks: 8 IO Block: 4096 regular file
Device: fd04h/64772d Inode: 1970021 Links: 1
Access: (0775/-rwxrwxr-x) Uid: ( 1051/username) Gid: ( 1028/username)
Access: 2022-09-10 17:51:41.904111692 +0800
Modify: 2022-09-10 17:49:24.957850296 +0800
Change: 2022-09-10 17:49:37.122051612 +0800
Birth: -
no errors on test side:
Ubuntu 20.04.5 LTS
Enumerating objects: 8, done.
Counting objects: 100% (8/8), done.
Delta compression using up to 2 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (5/5), 551 bytes | 551.00 KiB/s, done.
Total 5 (delta 0), reused 0 (delta 0)
To XXX.YY.XX.YY:/home/username/public_html/production-site.git
f251e56..9e7f4f3 master -> master
Branch 'master' set up to track remote branch 'master' from 'prodsite'.
Net result… no actual files in targeted directories