diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 333f76d..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,70 +0,0 @@ -stages: - - test - - build - - deploy -variables: - PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" - REGISTRY_HOST: localhost:5000 - TAG_LATEST: $REGISTRY_HOST/$CI_PROJECT_NAME/$CI_COMMIT_REF_NAME:latest - TAG_DRAFT: $REGISTRY_HOST/$CI_PROJECT_NAME-draft/$CI_COMMIT_REF_NAME:latest - GIT_SUBMODULE_STRATEGY: recursive # For submodules -cache: - paths: - - .cache/pip -# This job tests if the book compiles gracefully after a new addition -test-build: - stage: test - image: continuumio/miniconda3 - rules: - - if: $CI_PIPELINE_SOURCE == "merge_request_event" - script: - - pip install -r requirements.txt - - jupyter-book clean book/ - - jupyter-book build book/ -# This job builds the Docker container -build-book: - stage: build - image: docker - rules: - - if: $CI_COMMIT_BRANCH == "release" && $CI_PIPELINE_SOURCE == "push" - variables: - TAG: $TAG_LATEST - - 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 - - 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 - rules: - - if: $CI_COMMIT_BRANCH == "release" && $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! - 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 - 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: - - 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 diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 3e837c6..0000000 --- a/Dockerfile +++ /dev/null @@ -1,8 +0,0 @@ -FROM continuumio/miniconda3 -WORKDIR /book -COPY book/ . -RUN apt-get update && apt-get -y install git gcc -COPY requirements.txt requirements.txt -RUN pip install -r requirements.txt -RUN jupyter book build . -ENTRYPOINT [ "python", "-m", "http.server", "8000", "--directory", "/book/_build/html" ] \ No newline at end of file diff --git a/book/_config.yml b/book/_config.yml index 5754227..dc8a29d 100644 --- a/book/_config.yml +++ b/book/_config.yml @@ -29,7 +29,7 @@ sphinx: use_thebe_lite: true exclude_patterns: ["**/_*.yml", "**/*.md", "**/*.ipynb","**/*.gif","**/*.txt","**/*.json",] html_theme_options: - repository_url: "https://gitlab.tudelft.nl/interactivetextbooks-citg/jupyter-book-manual" + repository_url: "https://github.com/TeachBooks/manual/" use_repository_button: true use_issues_button : true launch_buttons: diff --git a/dummy.txt b/dummy.txt deleted file mode 100644 index 2995a4d..0000000 --- a/dummy.txt +++ /dev/null @@ -1 +0,0 @@ -dummy \ No newline at end of file