add site deploy target

This commit is contained in:
Umputun 2021-04-17 22:52:39 -05:00
parent d387b860d4
commit 7b8d1bb1c8

View File

@ -20,6 +20,8 @@ race_test:
build: info
- cd app && GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-X main.revision=$(REV) -s -w" -o ../dist/reproxy
site: build_site deploy_site
build_site:
@rm -f site/public/*
docker build -f Dockerfile.site -t reproxy.site .
@ -27,7 +29,11 @@ build_site:
docker cp reproxy.site:/build/public site/
docker rm -f reproxy.site
deploy_site:
rsync -avz -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --progress \
./site/public/ reproxy.io:/srv/www/reproxy.io
info:
- @echo "revision $(REV)"
.PHONY: dist docker race_test bin info
.PHONY: dist docker race_test bin info site build_site