Add Makefile
This commit is contained in:
parent
10c16de1d0
commit
415b861128
38
Makefile
Normal file
38
Makefile
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
|
||||||
|
DEST ?= axs@sdf.org:html
|
||||||
|
SITE_URL ?= https://axs.sdf.org
|
||||||
|
|
||||||
|
.PHONY: default help publish
|
||||||
|
|
||||||
|
build: #>
|
||||||
|
@echo "\t 🏗️ Building site"
|
||||||
|
@# We call hugo with two options:
|
||||||
|
@# --cleanDestinationDir, to remove deleted files
|
||||||
|
@# --minify, to compress files my removing extra whitespace
|
||||||
|
hugo --cleanDestinationDir --minify
|
||||||
|
|
||||||
|
publish: build #> Publish site
|
||||||
|
@echo "Publishing..."
|
||||||
|
@# rsync options:
|
||||||
|
@# verbose: show each operation
|
||||||
|
@# links: preserve symlinks
|
||||||
|
@# safe-links: ignore symlinks that point outside of tree
|
||||||
|
@# times: preserve modification times
|
||||||
|
@# delete: delete extraneous files, i.e., files on destination
|
||||||
|
@# chmod: set permsions
|
||||||
|
@echo "\t ⛟ Copying from public to ${DEST}"
|
||||||
|
@rsync \
|
||||||
|
--verbose \
|
||||||
|
--recursive \
|
||||||
|
--links \
|
||||||
|
--safe-links \
|
||||||
|
--times \
|
||||||
|
--delete \
|
||||||
|
--cvs-exclude \
|
||||||
|
--chmod=D755,F644 \
|
||||||
|
public/ \
|
||||||
|
${DEST}
|
||||||
|
@echo "\t 🛡️ Setting permissions"
|
||||||
|
@ssh axs@sdf.org 'mkhomepg -p'
|
||||||
|
@echo "✓ Publising complete"
|
||||||
|
@echo "\nThe site should be available on ${SITE_URL}"
|
Loading…
Reference in New Issue
Block a user