aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/jekyll.yml7
-rw-r--r--Makefile12
2 files changed, 17 insertions, 2 deletions
diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml
index 3094f4a..bcc4dd8 100644
--- a/.github/workflows/jekyll.yml
+++ b/.github/workflows/jekyll.yml
@@ -34,5 +34,8 @@ jobs:
with:
ssh-private-key: '${{ secrets.REMOTE_SSH_KEY }}'
- name: Deploy
- run: |
- rsync -avh -e 'ssh -o StrictHostKeyChecking=no' _site/ '${{ secrets.REMOTE_USER }}@${{ secrets.REMOTE_HOST }}:${{ secrets.REMOTE_DIR }}/' --delete
+ run: make deploy
+ env:
+ REMOTE_USER: '${{ secrets.REMOTE_USER }}'
+ REMOTE_HOST: '${{ secrets.REMOTE_HOST }}'
+ REMOTE_DIR: '${{ secrets.REMOTE_DIR }}'
diff --git a/Makefile b/Makefile
index ead804e..769d045 100644
--- a/Makefile
+++ b/Makefile
@@ -50,3 +50,15 @@ wget:
.PHONY: view
view:
xdg-open '$(call escape,$(URL))' &> /dev/null
+
+REMOTE_USER ?= who
+REMOTE_HOST ?= where
+REMOTE_DIR ?= /path/to/dir
+
+$(eval $(call noexpand,REMOTE_USER))
+$(eval $(call noexpand,REMOTE_HOST))
+$(eval $(call noexpand,REMOTE_DIR))
+
+.PHONY: deploy
+deploy:
+ rsync -avh -e 'ssh -o StrictHostKeyChecking=no' _site/ '$(call escape,$(REMOTE_USER)@$(REMOTE_HOST):$(REMOTE_DIR)/)' --delete