Add deploy command to Makefile

This commit is contained in:
Chandler Swift 2023-10-12 22:11:57 -05:00
parent 4761cfbd1c
commit 3458476ca4
Signed by: chandlerswift
GPG key ID: A851D929D52FB93F

View file

@ -1,2 +1,7 @@
minecraft-site: minecraft-site.go index.html go.mod go.sum minecraft-site: minecraft-site.go index.html go.mod go.sum
go build -tags netgo -ldflags '-extldflags "-static"' go build -tags netgo -ldflags '-extldflags "-static"'
.PHONY: deploy
deploy: minecraft-site
rsync --rsync-path="sudo -u minecraft rsync" minecraft-site zirconium:/home/minecraft/minecraft-site
ssh zirconium sudo systemctl restart minecraft-site.service