public_html/makefile

24 lines
604 B
Makefile

JEKYLL_CMD = bundle exec jekyll
DEST_PATH = /var/www/html/alice_sites/public_html
DEST_DIR_FLAGS = --destination=${DEST_PATH}
BUILD_FLAGS = --trace
SERVE_FLAGS = -H 0.0.0.0 -P 33006
all:
sg www-data -c "${JEKYLL_CMD} build ${BUILD_FLAGS} ${DEST_DIR_FLAGS}"
deploy:
${JEKYLL_CMD} build ${BUILD_FLAGS} ${DEST_DIR_FLAGS}
# Executa o build toda vez que muda um arquivo
# Rodando como serviço do systemd em /etc/systemd/system/alice-build-watch.service
# examplo: sg www-data -c 'make watch'
watch:
${JEKYLL_CMD} build ${BUILD_FLAGS} ${DEST_DIR_FLAGS} -w
serve:
${JEKYLL_CMD} serve ${SERVE_FLAGS}