2021-04-19 22:35:05 +07:00
|
|
|
.POSIX:
|
|
|
|
|
2021-07-02 19:08:25 +07:00
|
|
|
default: book
|
|
|
|
|
2021-06-20 18:24:23 +07:00
|
|
|
.PHONY: diagrams
|
|
|
|
diagrams:
|
|
|
|
cd diagrams \
|
2021-08-30 14:05:19 +07:00
|
|
|
&& python3 *.py
|
2021-07-02 19:08:25 +07:00
|
|
|
|
|
|
|
.PHONY: book
|
2021-08-30 14:03:28 +07:00
|
|
|
book: diagrams
|
2021-07-02 19:08:25 +07:00
|
|
|
mdbook build .
|
2021-08-30 13:02:00 +07:00
|
|
|
|
|
|
|
.PHONY: deploy
|
|
|
|
deploy:
|
|
|
|
@echo "Deploying to GitHub Pages"
|
|
|
|
git worktree add /tmp/book gh-pages
|
|
|
|
cp -rp book/* /tmp/book/
|
|
|
|
cd /tmp/book \
|
2021-08-30 14:18:54 +07:00
|
|
|
&& git add . \
|
|
|
|
&& git commit --message "Updates" || echo "No changes to commit" \
|
2021-08-30 13:02:00 +07:00
|
|
|
&& git push
|
|
|
|
git worktree remove /tmp/book
|