diff options
Diffstat (limited to '')
| -rw-r--r-- | Makefile | 24 |
1 files changed, 20 insertions, 4 deletions
@@ -1,18 +1,34 @@ +.PHONY: clean clean: hugo --cleanDestinationDir +.PHONY: server server: clean hugo serve --buildDrafts --buildFuture +.PHONY: deps deps: brew install hugo +.PHONY: build build: clean hugo +DEPLOY_BRANCH := gh-pages +DEPLOY_DIR := public + +.PHONY: publish publish: build - gsutil -m rsync -R _site/ gs://b.lumberjaph.net - gsutil -m acl ch -u AllUsers:R -R gs://b.lumberjaph.net/ - gsutil -m web set -m index.html -e 404.html gs://b.lumberjaph.net + git symbolic-ref HEAD refs/heads/$(DEPLOY_BRANCH) + git --work-tree $(DEPLOY_DIR) reset --mixed --quiet + git --work-tree $(DEPLOY_DIR) add --all + if git --work-tree $(DEPLOY_DIR) diff-index --quiet HEAD -- ; then \ + echo "no changes" ; \ + else \ + git --work-tree $(DEPLOY_DIR) commit -m "deploy " ; \ + git push origin $(DEPLOY_BRANCH) ; \ + fi -.PHONY: build clean server deps publish + git symbolic-ref HEAD refs/heads/master + git reset --mixed + rm rf $(DEPLOY_DIR) |
