|
1 month ago | |
---|---|---|
archetypes | 6 months ago | |
content | 1 month ago | |
layouts | 5 months ago | |
static | 4 months ago | |
themes | 6 months ago | |
.gitignore | 5 months ago | |
.gitmodules | 6 months ago | |
README.md | 5 months ago | |
config.toml | 5 months ago |
git clone --recursive gitea@git.selfprivacy.org:SelfPrivacy/selfprivacy.org.git && cd selfprivacy.org
hugo -D server --disableFastRender
git push
выкатит сайт на продБилдится и выкатывается git post-receive хуком на каждый коммит
#!/bin/sh
#chown root:nginx /var/www/
#chmod -v g+s /var/www/
#mkdir /var/www/from_gitea
#chown gitea /var/www/from_gitea
GIT_REPO=/var/lib/gitea/repositories/selfprivacy/selfprivacy.org.git/
TEMP_DIRECTORY=/tmp/temp
TARGET=/var/www/from_gitea/new
SITE_DIR=/var/www/from_gitea/selfprivacy.org
echo " /==============================="
echo " Post receive file active"
echo " Making temporary directory."
mkdir $TEMP_DIRECTORY
echo " Pulling into temporary directory."
git clone --recursive $GIT_REPO $TEMP_DIRECTORY
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
echo " Removing temporary directory."
rm -rf $TEMP_DIRECTORY
echo " Checking links."
linkchecker https://selfprivacy.org --check-extern