mirror of
https://github.com/khuedoan/homelab.git
synced 2025-01-24 18:06:16 +07:00
25 lines
453 B
Makefile
25 lines
453 B
Makefile
.POSIX:
|
|
|
|
default: book
|
|
|
|
.PHONY: diagrams
|
|
diagrams:
|
|
cd diagrams \
|
|
&& python3 -m venv .venv \
|
|
&& pip3 install -r requirements.txt \
|
|
&& python3 *
|
|
|
|
.PHONY: book
|
|
book: diagrams
|
|
mdbook build .
|
|
|
|
.PHONY: deploy
|
|
deploy:
|
|
@echo "Deploying to GitHub Pages"
|
|
git worktree add /tmp/book gh-pages
|
|
cp -rp book/* /tmp/book/
|
|
cd /tmp/book \
|
|
&& git commit --all --message "Updates" || echo "No changes to commit" \
|
|
&& git push
|
|
git worktree remove /tmp/book
|