New git-hook

master
Zholnay Kirill 2020-09-02 16:08:13 +03:00
parent 67f798ab1f
commit 7e1f306806
1 changed files with 2 additions and 6 deletions

View File

@ -17,7 +17,6 @@
```sh
#!/bin/sh
### Do it on system before! ###
#chown root:nginx /var/www/
#chmod -v g+s /var/www/
#mkdir /var/www/from_gitea
@ -37,11 +36,8 @@ mkdir $TEMP_DIRECTORY
echo " Pulling into temporary directory."
git clone --recursive $GIT_REPO $TEMP_DIRECTORY
echo "Building new site."
hugo -D -s $TEMP_DIRECTORY -d $TARGET
echo " Removing existing site."
rm -rf $SITE_DIR
echo "Building new site and removing old."
hugo -D -s $TEMP_DIRECTORY -d $TARGET && rm -rf $SITE_DIR
echo " Move new to site dir."
mv $TARGET $SITE_DIR