瀏覽代碼

Add a Makefile target to publish on the server

master
Marien Fressinaud 6 年之前
父節點
當前提交
1d0531f660
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. 9
    0
      Makefile

+ 9
- 0
Makefile 查看文件

@@ -1,5 +1,9 @@
.DEFAULT_GOAL := help

include .env

SERVER_OUTPUT = $(MF_GALLERY_OUTPUT) # user@server.url:/path/to/website

.PHONY: install
install: ## Install the dependencies to build the website
pip3 install --user -r requirements.txt
@@ -16,6 +20,11 @@ clean: ## Clean output files
serve: build ## Serve the website (development)
cd output && python3 -m http.server 8080

.PHONY: publish
publish: build ## Publish the website online (rsync)
echo $(SERVER_OUTPUT)
rsync -P -rvzc --cvs-exclude --delete ./output/ $(SERVER_OUTPUT)

.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

Loading…
取消
儲存