2023-07-16 17:25:03 +02:00
|
|
|
OUTPUT_DIR=public
|
|
|
|
|
|
|
|
# Development
|
2024-02-03 22:32:58 +01:00
|
|
|
dev:
|
2023-01-01 22:42:16 +01:00
|
|
|
URL=http://localhost BASE_URL=/ yarn run start --no-open
|
2022-11-05 15:24:54 +01:00
|
|
|
|
2023-07-16 17:25:03 +02:00
|
|
|
build-poincare: assets
|
2023-09-07 20:09:24 +02:00
|
|
|
yarn run build --out-dir $(OUTPUT_DIR)
|
2022-11-05 15:24:54 +01:00
|
|
|
|
2023-07-16 17:25:03 +02:00
|
|
|
# Upload the built webpage
|
|
|
|
deploy-poincare: build-poincare
|
|
|
|
rsync -avzrlpptv --delete $(OUTPUT_DIR)/ poincare:~/public_html/blog/
|
2022-11-05 23:14:59 +01:00
|
|
|
|
2023-07-16 17:25:03 +02:00
|
|
|
# Build assets that are generated from the git, but not version-controlled
|
2023-08-18 12:19:47 +02:00
|
|
|
assets: regenerate-dots regenerate-archives
|
2023-07-16 17:25:03 +02:00
|
|
|
|
|
|
|
# Regenerates dotfiles that are rendered to SVG
|
2022-11-18 11:57:56 +01:00
|
|
|
regenerate-dots:
|
2022-11-24 17:25:46 +01:00
|
|
|
sh regenerate-dots.sh
|
2022-11-18 11:57:56 +01:00
|
|
|
|
2023-08-18 12:19:47 +02:00
|
|
|
# Regenerates archives with static content, e.g. source files
|
|
|
|
regenerate-archives:
|
|
|
|
sh regenerate-archives.sh
|
2022-11-24 17:24:21 +01:00
|
|
|
|
2023-07-16 17:25:03 +02:00
|
|
|
# Deploys
|
2023-09-07 20:09:24 +02:00
|
|
|
deploy: deploy-poincare
|
2023-07-16 17:25:03 +02:00
|
|
|
|
2023-09-07 20:09:24 +02:00
|
|
|
.PHONY: dev deploy-poincare assets regenerate-dots regenerate-archives
|