diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..05af8fe --- /dev/null +++ b/Makefile @@ -0,0 +1,28 @@ +.PHONY: serve build compress deploy clean + + +serve: + EXECJS_RUNTIME=MiniRacer bundle exec jekyll serve --livereload --incremental + + +build: + EXECJS_RUNTIME=MiniRacer JEKYLL_ENV=production bundle exec jekyll build + + +FINDARGS1 = -name "*.html" -o -name "*.xml" -o -name "*.css" -o -name "*.js" +FINDARGS2 = -name "*.svg" -o -name "*.webmanifest" -o -name "*.ico" -o -name "*.txt" +compress: + for f in `find public/ -type f $(FINDARGS1) -o $(FINDARGS2)`; do \ + echo "Compressing $$f..." ; \ + gzip --keep --force -9 $$f ; \ + brotli --keep --force -Z $$f ; \ + done + + +deploy: + rsync --rsh="ssh -p $(PORT)" --stats --checksum --recursive public/ $(HOST):/srv/prefetch.eu/public/ + + +clean: + rm -rf public/* + rm -rf source/.jekyll-cache/* |