From 80f18fe0d66337be07d19611f205db786d11244e Mon Sep 17 00:00:00 2001 From: Tom van Woudenberg Date: Fri, 5 Jul 2024 08:30:38 +0200 Subject: [PATCH 1/5] book --> teachbook --- book/external/deploy-book-workflow | 2 +- book/external/template | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/book/external/deploy-book-workflow b/book/external/deploy-book-workflow index 53562ea..081491b 160000 --- a/book/external/deploy-book-workflow +++ b/book/external/deploy-book-workflow @@ -1 +1 @@ -Subproject commit 53562ea342ea85116b1dfdbe23c59dc85dd2e394 +Subproject commit 081491b5f7bd0beecb5663228eaf5ab80b9dd57c diff --git a/book/external/template b/book/external/template index a9aaa00..2d5513d 160000 --- a/book/external/template +++ b/book/external/template @@ -1 +1 @@ -Subproject commit a9aaa006b24957d5e913ca52272eede5cc7f2e79 +Subproject commit 2d5513da0a53b606f870890237ef4417dc18b398 From 589333305bfc00d67081a1f32a9d6d16bbced832 Mon Sep 17 00:00:00 2001 From: Kwangjin Lee Date: Fri, 12 Jul 2024 11:45:16 +0200 Subject: [PATCH 2/5] Add new file --- dummy.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 dummy.txt diff --git a/dummy.txt b/dummy.txt new file mode 100644 index 0000000..2995a4d --- /dev/null +++ b/dummy.txt @@ -0,0 +1 @@ +dummy \ No newline at end of file From 8e10d35ac9c5ed85b54a6447067d12d7f9b98a9f Mon Sep 17 00:00:00 2001 From: Kwangjin Lee Date: Fri, 12 Jul 2024 12:43:04 +0200 Subject: [PATCH 3/5] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7eb347c..7a7df22 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,10 +14,10 @@ cache: paths: - .cache/pip -# This job tests if the book compiles gracefully after a new addition test-build: stage: test - image: continuumio/miniconda3 + tags: + - Textbook runner rules: - if: $CI_PIPELINE_SOURCE == "merge_request_event" script: @@ -25,10 +25,10 @@ test-build: - jupyter-book clean book/ - jupyter-book build book/ -# This job builds the Docker container build-book: stage: build - image: docker + tags: + - Textbook runner rules: - if: $CI_COMMIT_BRANCH == "publish" && $CI_PIPELINE_SOURCE == "push" variables: @@ -36,41 +36,38 @@ build-book: - if: $CI_COMMIT_BRANCH == "main" && $CI_PIPELINE_SOURCE == "push" variables: TAG: $TAG_DRAFT - before_script: - - docker info script: - if [ "$TAG" = "$TAG_LATEST" ]; then sed --in-place=".bak" '/# START DRAFT/,/# END DRAFT/{//!d}' book/_config.yml; fi + # You might need to adjust or remove these Docker commands depending on the runner's capabilities - docker build -t $TAG . - docker push $TAG -# This job takes down the existing container and starts the new one deploy-book: stage: deploy - image: docker + tags: + - Textbook runner rules: - if: $CI_COMMIT_BRANCH == "publish" && $CI_PIPELINE_SOURCE == "push" - before_script: - - docker info - - docker stop $CI_PROJECT_NAME || exit_code=$? - - if [ $exit_code -ne 0 ]; then echo "Container not found, cannot stop"; else docker rm $CI_PROJECT_NAME; fi script: - - docker run -d --restart always -p 8000:8000 --name $CI_PROJECT_NAME $TAG_LATEST # Make sure to use a different port for each book! + # These Docker commands might need to be adjusted or replaced + - docker stop $CI_PROJECT_NAME || true + - docker rm $CI_PROJECT_NAME || true + - docker run -d --restart always -p 8000:8000 --name $CI_PROJECT_NAME $TAG_LATEST environment: name: production url: https://interactivetextbooks.citg.tudelft.nl/jupyter-book-manual -# Deploy the draft version of the book deploy-draft: stage: deploy - image: docker + tags: + - Textbook runner rules: - if: $CI_COMMIT_BRANCH == "main" && $CI_PIPELINE_SOURCE == "push" - before_script: - - docker info - - docker stop $CI_PROJECT_NAME-draft || exit_code=$? - - if [ $exit_code -ne 0 ]; then echo "Container not found, cannot stop"; else docker rm $CI_PROJECT_NAME-draft; fi script: + # These Docker commands might need to be adjusted or replaced + - docker stop $CI_PROJECT_NAME-draft || true + - docker rm $CI_PROJECT_NAME-draft || true - docker run -d --restart always -p 8018:8000 --name $CI_PROJECT_NAME-draft $TAG_DRAFT environment: name: draft - url: https://interactivetextbooks.citg.tudelft.nl/jupyter-book-manual-draft + url: https://interactivetextbooks.citg.tudelft.nl/jupyter-book-manual-draft \ No newline at end of file From ddf73908f61bf2ebaf63fad99638d0d10a71146b Mon Sep 17 00:00:00 2001 From: Kwangjin Lee Date: Fri, 12 Jul 2024 12:44:18 +0200 Subject: [PATCH 4/5] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7a7df22..7eb347c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,10 +14,10 @@ cache: paths: - .cache/pip +# This job tests if the book compiles gracefully after a new addition test-build: stage: test - tags: - - Textbook runner + image: continuumio/miniconda3 rules: - if: $CI_PIPELINE_SOURCE == "merge_request_event" script: @@ -25,10 +25,10 @@ test-build: - jupyter-book clean book/ - jupyter-book build book/ +# This job builds the Docker container build-book: stage: build - tags: - - Textbook runner + image: docker rules: - if: $CI_COMMIT_BRANCH == "publish" && $CI_PIPELINE_SOURCE == "push" variables: @@ -36,38 +36,41 @@ build-book: - if: $CI_COMMIT_BRANCH == "main" && $CI_PIPELINE_SOURCE == "push" variables: TAG: $TAG_DRAFT + before_script: + - docker info script: - if [ "$TAG" = "$TAG_LATEST" ]; then sed --in-place=".bak" '/# START DRAFT/,/# END DRAFT/{//!d}' book/_config.yml; fi - # You might need to adjust or remove these Docker commands depending on the runner's capabilities - docker build -t $TAG . - docker push $TAG +# This job takes down the existing container and starts the new one deploy-book: stage: deploy - tags: - - Textbook runner + image: docker rules: - if: $CI_COMMIT_BRANCH == "publish" && $CI_PIPELINE_SOURCE == "push" + before_script: + - docker info + - docker stop $CI_PROJECT_NAME || exit_code=$? + - if [ $exit_code -ne 0 ]; then echo "Container not found, cannot stop"; else docker rm $CI_PROJECT_NAME; fi script: - # These Docker commands might need to be adjusted or replaced - - docker stop $CI_PROJECT_NAME || true - - docker rm $CI_PROJECT_NAME || true - - docker run -d --restart always -p 8000:8000 --name $CI_PROJECT_NAME $TAG_LATEST + - docker run -d --restart always -p 8000:8000 --name $CI_PROJECT_NAME $TAG_LATEST # Make sure to use a different port for each book! environment: name: production url: https://interactivetextbooks.citg.tudelft.nl/jupyter-book-manual +# Deploy the draft version of the book deploy-draft: stage: deploy - tags: - - Textbook runner + image: docker rules: - if: $CI_COMMIT_BRANCH == "main" && $CI_PIPELINE_SOURCE == "push" + before_script: + - docker info + - docker stop $CI_PROJECT_NAME-draft || exit_code=$? + - if [ $exit_code -ne 0 ]; then echo "Container not found, cannot stop"; else docker rm $CI_PROJECT_NAME-draft; fi script: - # These Docker commands might need to be adjusted or replaced - - docker stop $CI_PROJECT_NAME-draft || true - - docker rm $CI_PROJECT_NAME-draft || true - docker run -d --restart always -p 8018:8000 --name $CI_PROJECT_NAME-draft $TAG_DRAFT environment: name: draft - url: https://interactivetextbooks.citg.tudelft.nl/jupyter-book-manual-draft \ No newline at end of file + url: https://interactivetextbooks.citg.tudelft.nl/jupyter-book-manual-draft From be23371c770b44a634254893da52e51ff31d9b0c Mon Sep 17 00:00:00 2001 From: Julie Kirsch Date: Tue, 16 Jul 2024 19:42:32 +0200 Subject: [PATCH 5/5] final --- book/intro.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/book/intro.md b/book/intro.md index 290839f..b1ff072 100644 --- a/book/intro.md +++ b/book/intro.md @@ -3,6 +3,11 @@ This is an introduction to Git, VS Code and Jupyter Books for teachers and teaching assistants involved in TeachBooks, our platform easing the process of making a Jupyter book. This book is still work in progress, so feel free to contribute https://gitlab.tudelft.nl/interactivetextbooks-citg/jupyter-book-manual! For more information about teachbooks, visit [https://teachbooks.tudelft.nl/](https://teachbooks.tudelft.nl/). ## Contact -If you encounter any issues and you've a TU Delft account, report it by clicking --> {fa}`lightbulb` on the top right corner of this page. Or contribute directly by creating a merge request in the [repository](https://gitlab.tudelft.nl/interactivetextbooks-citg/jupyter-book-manual). +If you encounter any issues and you have a TU Delft account, report it by clicking --> {fa}`lightbulb` on the top right corner of this page. Or contribute directly by creating a merge request in the [repository](https://gitlab.tudelft.nl/interactivetextbooks-citg/jupyter-book-manual). -If you've questions, contact Tom van Woudenberg, Robert Lanzafame or our TAs Julie Kirsch at TeachBooks@tudelft.nl, also for non-TU Delft account holders. TU Delft account holder can also contact us in the [MS Teams Open Interactive Textbooks Community](https://teams.microsoft.com/l/team/19%3Ah9-uRcP_yYauh-VuoPFozJVUvHVOB4a0mz1ZWvh4q4Q1%40thread.tacv2/conversations?groupId=3e88c1f3-4a4f-483a-a366-7e617de9ba99&tenantId=096e524d-6929-4030-8cd3-8ab42de0887b) \ No newline at end of file +If you have questions, contact Tom van Woudenberg, Robert Lanzafame or our TA Julie Kirsch at TeachBooks@tudelft.nl, also for non-TU Delft account holders. TU Delft account holder can also contact us in the [MS Teams Open Interactive Textbooks Community](https://teams.microsoft.com/l/team/19%3Ah9-uRcP_yYauh-VuoPFozJVUvHVOB4a0mz1ZWvh4q4Q1%40thread.tacv2/conversations?groupId=3e88c1f3-4a4f-483a-a366-7e617de9ba99&tenantId=096e524d-6929-4030-8cd3-8ab42de0887b) + +## Feedback +We really value your feedback on this manual so we can keep improving it. Please keep using the manual as you build your own Jupyter Book and come back to fill out this short [survey](https://forms.gle/hXbFUQgN95H8ftxt9). + +Happy book building! \ No newline at end of file