2023-07-16 17:25:03 +02:00
|
|
|
OUTPUT_DIR=public
|
|
|
|
|
|
|
|
# Development
|
|
|
|
dev: assets
|
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 the webpage
|
|
|
|
build-aisa: assets
|
|
|
|
URL="https://fi.muni.cz" BASE_URL="~xfocko/kb/" yarn run build --out-dir $(OUTPUT_DIR)
|
|
|
|
|
|
|
|
build-poincare: assets
|
|
|
|
URL="https://blog.mfocko.xyz" BASE_URL="/" 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-aisa: build-aisa
|
|
|
|
rsync -avzrlpptv --delete $(OUTPUT_DIR)/ aisa:~/public_html/kb/
|
2022-11-05 15:24:54 +01:00
|
|
|
|
2023-07-16 17:25:03 +02:00
|
|
|
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
|
|
|
|
deploy: deploy-aisa deploy-poincare
|
|
|
|
|
2023-08-18 12:19:47 +02:00
|
|
|
.PHONY: dev deploy-aisa deploy-poincare assets regenerate-dots regenerate-archives
|