use make without arguments for local and remote build

This commit is contained in:
Yax 2023-10-14 12:37:11 +02:00
parent 9b93adbb4b
commit 1826de7102
2 changed files with 17 additions and 5 deletions

3
.gitignore vendored
View file

@ -15,4 +15,5 @@ blog.sublime-project
blog.sublime-workspace
ssl/
.python-version
poetry.toml
poetry.toml
.local

View file

@ -1,12 +1,23 @@
site:
# Makefile
#
# if a file .local exists run site locally
ifeq ($(wildcard .local),)
TARGET = site_remote
else
TARGET = site_local
endif
site: $(TARGET)
echo $(TARGET)
site_remote:
git pull
makesite
systemctl reload nginx
site_local:
site_local:
./makesite.py --params params-local.json
serve: site_local
cd _site && python -m SimpleHTTPServer 2> /dev/null || python3 -m http.server
dock: site_local