frostfs.info/Makefile
Vitaliy Potyarkin 576d108b3b
All checks were successful
build static site / build (pull_request) Successful in 27s
build static site / build (push) Successful in 1m2s
[#25] Deploy the site via SSH
Signed-off-by: Vitaliy Potyarkin <v.potyarkin@yadro.com>
2024-09-05 12:21:34 +03:00

34 lines
723 B
Makefile

#!/usr/bin/make -f
SHELL = bash
PUBDIR = public
HUGO_VERSION = 0.91.0
HUGO_BIN ?= bin/hugo-$(HUGO_VERSION)
.PHONY: all clean
all: public
bin/hugo-$(HUGO_VERSION):
@wget -q https://github.com/gohugoio/hugo/releases/download/v$(HUGO_VERSION)/hugo_extended_$(HUGO_VERSION)_Linux-64bit.tar.gz -O - |\
tar -xz -C bin/ hugo;
@mv bin/hugo $@
clean:
@rm -rf $(PUBDIR)
@rm -rf tmp
@rm -rf bin/hugo*
public: submodules $(HUGO_BIN)
@$(HUGO_BIN)
server: submodules $(HUGO_BIN)
@$(HUGO_BIN) server --disableFastRender
submodules:
@git submodule init
@git submodule update --recursive --remote
.PHONY: deploy
deploy:
test -f public/index.html
cd public && tar --gzip --create . | ssh deploy@frostfs.info frostfs.info