From 62af2367bb3ffd8abd1ff59dc01e41ab842f2dde Mon Sep 17 00:00:00 2001 From: Benjamin Fry Date: Tue, 12 Mar 2019 11:22:00 -0700 Subject: [PATCH 1/4] add docs for publishing to github pages manually --- book-example/src/continuous-integration.md | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/book-example/src/continuous-integration.md b/book-example/src/continuous-integration.md index be47a2fc..a0f2e557 100644 --- a/book-example/src/continuous-integration.md +++ b/book-example/src/continuous-integration.md @@ -54,3 +54,35 @@ deploy: ``` That's it! + +### Deploying to GitHub Pages manually + +If you're CI doesn't support a GitHub pages, or you're deploying somewhere else +with GitHub pages like integration, *note: you may want to use different tmp dirs*: + +```console +$> git worktree add /tmp/book gh-pages +$> mdbook build +$> rm -rf /tmp/book/* # this won't delete the .git directory +$> cp -rp book/* /tmp/book/ +$> cd /tmp/book +$> git add -A +$> git commit 'new book message' +$> git push origin gh-pages +$> cd - +``` + +Or put this into a Makefile rule: + +```makefile +.PHONY: deploy +deploy: book + @echo "====> deploying to github" + git worktree add /tmp/book gh-pages + rm -rf /tmp/book/* + cp -rp book/* /tmp/book/ + cd /tmp/book && \ + git add -A && \ + git commit -m "deployed on $(shell date) by ${USER}" && \ + git push origin gh-pages +``` From 39211291d90ed02ddaa41bbd162c43a3e7e9baf2 Mon Sep 17 00:00:00 2001 From: Dylan DPC Date: Mon, 29 Apr 2019 15:33:25 -0700 Subject: [PATCH 2/4] Update book-example/src/continuous-integration.md Co-Authored-By: bluejekyll --- book-example/src/continuous-integration.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/book-example/src/continuous-integration.md b/book-example/src/continuous-integration.md index a0f2e557..322b28ba 100644 --- a/book-example/src/continuous-integration.md +++ b/book-example/src/continuous-integration.md @@ -58,7 +58,8 @@ That's it! ### Deploying to GitHub Pages manually If you're CI doesn't support a GitHub pages, or you're deploying somewhere else -with GitHub pages like integration, *note: you may want to use different tmp dirs*: +with integrations such as Github Pages: + *note: you may want to use different tmp dirs*: ```console $> git worktree add /tmp/book gh-pages From f9454615b1081a7e61f66c3c3c7698212dbb2323 Mon Sep 17 00:00:00 2001 From: Dylan DPC Date: Mon, 29 Apr 2019 15:33:31 -0700 Subject: [PATCH 3/4] Update book-example/src/continuous-integration.md Co-Authored-By: bluejekyll --- book-example/src/continuous-integration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book-example/src/continuous-integration.md b/book-example/src/continuous-integration.md index 322b28ba..9c0b25ae 100644 --- a/book-example/src/continuous-integration.md +++ b/book-example/src/continuous-integration.md @@ -57,7 +57,7 @@ That's it! ### Deploying to GitHub Pages manually -If you're CI doesn't support a GitHub pages, or you're deploying somewhere else +If your CI doesn't support a GitHub pages, or you're deploying somewhere else with integrations such as Github Pages: *note: you may want to use different tmp dirs*: From aea317e173f617b557edf89f018a2687420a35d2 Mon Sep 17 00:00:00 2001 From: Dylan DPC Date: Tue, 30 Apr 2019 00:50:35 +0200 Subject: [PATCH 4/4] Update continuous-integration.md --- book-example/src/continuous-integration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book-example/src/continuous-integration.md b/book-example/src/continuous-integration.md index 9c0b25ae..d8db9658 100644 --- a/book-example/src/continuous-integration.md +++ b/book-example/src/continuous-integration.md @@ -57,7 +57,7 @@ That's it! ### Deploying to GitHub Pages manually -If your CI doesn't support a GitHub pages, or you're deploying somewhere else +If your CI doesn't support GitHub pages, or you're deploying somewhere else with integrations such as Github Pages: *note: you may want to use different tmp dirs*: