Add makefile

This commit is contained in:
Carneiro 2024-08-21 16:26:28 -03:00
parent 64ad93f61d
commit d5da9d4194
1 changed files with 24 additions and 0 deletions

24
makefile Normal file
View File

@ -0,0 +1,24 @@
JEKYLL_CMD = bundle exec jekyll
DEST_PATH = /var/www/html/alice_sites/alice_index
LOG_PATH = /tmp/alice_index-jekyll.log
DEST_DIR_FLAGS = --destination=${DEST_PATH}
BUILD_FLAGS = --trace --incremental
SERVE_FLAGS = -H 0.0.0.0 -P 33002
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}