diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..a121a7d75 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "book/public"] + path = book/public + url = https://github.com/rust-nostr/rust-nostr.github.io.git diff --git a/book/.gitignore b/book/.gitignore deleted file mode 100644 index ccbfadbd8..000000000 --- a/book/.gitignore +++ /dev/null @@ -1 +0,0 @@ -site/ \ No newline at end of file diff --git a/book/Makefile b/book/Makefile index 07432de60..96979ff38 100644 --- a/book/Makefile +++ b/book/Makefile @@ -2,8 +2,14 @@ init: pip install -U poetry poetry install -build: - poetry run mkdocs build --strict --clean --verbose +checkout: + git submodule update --init --recursive --remote + +build: checkout + poetry run mkdocs build --strict --clean --verbose --site-dir public/book + +deploy: build + cd public && git add book && git commit -m "Deploy book" && git push origin HEAD:master --force serve: mkdocs serve \ No newline at end of file diff --git a/book/public b/book/public new file mode 160000 index 000000000..9de3ac8f1 --- /dev/null +++ b/book/public @@ -0,0 +1 @@ +Subproject commit 9de3ac8f1f0405d3bdc547252caa76245373a68d