Makefile and post-receive hook for deploying.

This commit is contained in:
Florian Obser 2022-12-03 17:25:53 +01:00 committed by Florian Obser
parent f2b8adaba0
commit c1de8266eb
2 changed files with 26 additions and 0 deletions

18
Makefile Normal file
View File

@ -0,0 +1,18 @@
FILES != ls *.html *.css
.PHONEY: all fetch publish
.SUFFIXES: .html .html.gz .css .css.gz
.html.html.gz:
gzip -9fk $<
.css.css.gz:
gzip -9fk $<
all: fetch publish ${FILES:=.gz}
fetch:
git pull
publish:
./publish.el

8
gitea-post-receive-hook Executable file
View File

@ -0,0 +1,8 @@
#!/bin/ksh
for v in $(typeset +x | egrep -v '(PATH|PWD|SHELL)'); do
unset $v
done
cd /var/www/htdocs
make