Files
website/justfile
2025-12-21 11:47:33 -08:00

50 lines
1.3 KiB
Makefile

default: project-name
@just --list
project-name:
@echo "iiogama.0x212.com Website"
draft:
bash -c './bin/blog.sh draft'
edit:
bash -c './bin/blog.sh edit'
post:
bash -c './bin/blog.sh post'
build: build-blog build-photos
build-blog:
bash -c './bin/blog.sh build'
build-photos:
cd ./photos/; bash -c '../bin/gallery.sh -t "Photos" -d "_thumbs"'
serve:
test -d _output && bash -c './bin/serve.sh -d ./_output/' || exit 1
push: push-blog push-photos push-assets
git add .; git commit -m "$(date +%Y%m%d%H%M%S) push"; git push
push-blog:
find ./_output/ -type d -print0 | xargs -0 -I {} chmod 775 "{}"
find ./_output/ -type f -print0 | xargs -0 -I {} chmod 664 "{}"
rsync -avz ./_output/ iiogama-web:/var/www/htdocs/
push-photos:
find ./photos/ -type d -print0 | xargs -0 -I {} chmod 775 "{}"
find ./photos/ -type f -print0 | xargs -0 -I {} chmod 664 "{}"
rsync -avz ./photos/ iiogama-web:/var/www/htdocs/photos/
push-assets:
find ./assets/ -type d -print0 | xargs -0 -I {} chmod 775 "{}"
find ./assets/ -type f -print0 | xargs -0 -I {} chmod 664 "{}"
rsync -avz ./assets/ iiogama-web:/var/www/htdocs/
clean:
test -d _output/ && rm -rf _output/ || exit 0
test -d photos/_thumbs/ && rm -rf photos/_thumbs/ || exit 0
test -f photos/index.html && rm photos/index.html || exit 0
test -f photos/style.css && rm photos/style.css || exit 0