25 lines
501 B
Makefile
25 lines
501 B
Makefile
all: build serve
|
|
|
|
local_build: prepare build upload_to_srv clean
|
|
|
|
drone_build: prepare build copy_to_dir unprepare clean
|
|
|
|
build:
|
|
mkdocs build
|
|
clean:
|
|
rm -rfv site/
|
|
prepare:
|
|
pip install mkdocs mkdocs-windmill-dark
|
|
unprepare:
|
|
pip uninstall -y mkdocs mkdocs-windmill-dark
|
|
serve:
|
|
mkdocs serve
|
|
|
|
upload_to_srv:
|
|
rsync -a -P --delete `pwd`/site/ geekwiki:/srv/http/
|
|
|
|
copy_to_dir:
|
|
cp -r /srv/http /srv/http_${DRONE_BUILD_NUMBER}
|
|
rsync -a -P --delete `pwd`/site/ /srv/http/
|
|
chown -R http:http /srv/http
|