selfprivacy_fork/README.md

44 lines
1.2 KiB
Markdown
Raw Normal View History

2020-08-17 17:17:02 +03:00
# Сайт selfprivacy.org
2020-08-17 17:35:34 +03:00
* CMS — https://gohugo.io/
* Тема — https://github.com/mitrichius/hugo-theme-anubis
2020-08-17 17:23:36 +03:00
* Графика - https://romannurik.github.io/AndroidAssetStudio/icons-launcher.html
2020-08-17 17:35:34 +03:00
* Проверка орфографии и чистоты текста — https://glvrd.ru/
2020-08-17 17:23:36 +03:00
2020-08-17 17:35:34 +03:00
Билдится и выкатывается git post-receive хуком на каждый коммит
2020-08-17 17:17:02 +03:00
```sh
#!/bin/sh
### Do it on system before! ###
#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."
hugo -D -s $TEMP_DIRECTORY -d $TARGET
echo " Removing existing site."
rm -rf $SITE_DIR
echo " Move new to site dir."
mv $TARGET $SITE_DIR
echo " Removing temporary directory."
rm -rf $TEMP_DIRECTORY
```