Created
June 30, 2023 10:35
-
-
Save jackbaty/b89aa74ef015797780936555e51643b7 to your computer and use it in GitHub Desktop.
Makefile for deploying baty.net
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SERVER_HOST=servername.baty.net | |
SERVER_DIR=/home/jbaty/apps/baty.net/public_html | |
PUBLIC_DIR=/Users/jbaty/sites/blog/public/ | |
TARGET=DigitalOcean | |
.POSIX: | |
.PHONY: build checkpoint deploy | |
# search index. No longer used. | |
# npx -y pagefind --source public | |
build: | |
rm -rf $(PUBLIC_DIR) | |
hugo --gc --minify | |
checkpoint: | |
git add . | |
git diff-index --quiet HEAD || git commit -m "Publish checkpoint" | |
deploy: build checkpoint | |
git push | |
@echo "\033[0;32mDeploying updates to $(TARGET)...\033[0m" | |
rsync -v -rz --checksum --delete --no-perms $(PUBLIC_DIR) $(SERVER_HOST):$(SERVER_DIR) | |
open raycast://confetti |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment