You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
967 B
44 lines
967 B
domain := "earnestma.com"
|
|
hugo_baseurl := "https://" + domain + "/"
|
|
staging_url := "https://staging.earnestma.com/"
|
|
staging_location := "earne@staging.earnestma.com:staging.earnestma.com"
|
|
user := "earne@" + domain
|
|
www_root := "/home/earne/" + domain
|
|
www_rsync_dest := user + ":" + www_root
|
|
output_dir := "public"
|
|
|
|
# build and deploy
|
|
default: deploy-main
|
|
|
|
# show this help (just --list)
|
|
help:
|
|
just --list
|
|
|
|
# remove output files
|
|
clean:
|
|
rm -rf {{ output_dir }}
|
|
rm -rf static/recipes.yaml
|
|
|
|
# build the site
|
|
build site=hugo_baseurl +flags='--gc': clean
|
|
cp data/recipes.yaml static/recipes.yaml
|
|
hugo -b {{ site }} {{ flags }}
|
|
|
|
# deploy
|
|
deploy-main: build
|
|
rsync {{ output_dir }}/ {{ www_rsync_dest }} -ravz --delete
|
|
|
|
# staging deploy
|
|
deploy-staging: (build staging_url)
|
|
rsync {{ output_dir }}/ {{ staging_location }} -ravz --delete
|
|
|
|
# serve
|
|
serve:
|
|
hugo serve
|
|
|
|
# run tests
|
|
test: build _test_check-links
|
|
|
|
_test_check-links:
|
|
lychee content/
|