From bbaa351b561051f911c227339b00dbf1f3c7f7da Mon Sep 17 00:00:00 2001 From: Timothy Middelkoop Date: Wed, 3 Nov 2021 10:00:36 -0500 Subject: [PATCH 1/2] .DS_Store is a file not a folder --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index bcf3611..903e6d6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -.DS_Store/ +.DS_Store .ipynb_checkpoints/ /.vscode/ .venv/ From 3e0ee4d5a902d13b1ed303cda6944e84210e36d7 Mon Sep 17 00:00:00 2001 From: Timothy Middelkoop Date: Wed, 3 Nov 2021 10:02:45 -0500 Subject: [PATCH 2/2] Build instructions --- Build.md | 20 +++++++++++++++++++- README.md | 2 ++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Build.md b/Build.md index d9b5a55..8789c36 100644 --- a/Build.md +++ b/Build.md @@ -1,14 +1,32 @@ # Book Build Instructions +## Building and Publishing the Book + To build the book for local development run ``` ./build-book.sh ``` +This will create a local Python venv environment in `.venv/`, install Jupyter Book and dependcies and build it. The Jupyter Book content is located in `content`. The build process does not reevaluate the Jupyter Notbooks due to the complexity of building across all the providers in a single run. Development for each provider should be done in a `provider-dev` branch (`gcp-dev`, `aws-dev` and `azure-dev` branch). -To copy results to the `gh-pages` branch and push run +The resulting book is a set of static html pages found in [`content/_build/html/`](content/_build/html/). If development is being done remotly these pages can be exposed on port 8080 by running. +``` +./preview-book.html +``` +This runs a local http server enabling the "preview" feature of the Cloud Shell to view the rendered book. Visual Cloud Studio, when used in a remote shell, will also redirect this port to the local developmen machine and the previw can be found on [localhost:8080](http://localhost:8080). + +To use GitHub pages to preview or publish run ``` ./push-book.sh ``` +THis will copy rendered content to the `gh-pages` branch and push to the `private` remote. + +To publish to the `gh-pages` of the `origin` (or other) remote run. +``` +./push-book.sh origin +``` + +This copies the contents of `content/_build/html/` to `docs/` so GitHub Pages will render the document. GitHub pages should be set to the `gh-pages` and `docs/` folder. The script pushes a new branch overwriting the old branch and will not track changes. + ## GCP diff --git a/README.md b/README.md index ecda3d2..f62fac3 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # CLASS-core Curriculum development for Cloud for Researchers, A Primer + +For development see the [build instructions](Build.md).