Commit b5b11b84 authored by Axel Dürkop's avatar Axel Dürkop
Browse files

Add configuration

parent 0dee7184
variables:
COLON: ':'
stages:
- build
- review
- deploy
build:
stage: build
only:
- branches
tags:
- development
script:
- pwd
- gitbook install
- gitbook build
# Quick and dirty hack: The creation of the PDF document does not always work. This seems to be a bug.
- mkdir -p book_pdf; until gitbook pdf ./ ./book_pdf/book.pdf; do printf "$s\n" "failure, next try …"; done
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
paths:
# Was hier nicht gelistet ist, landet auch nicht in der `review`-Phase
- _book
- book_pdf
start_review:
stage: review
script:
- sshpass -p "$SSH_PASSWD" ssh -p "$SSH_PORT" $SSH_USER@$HOST_NAME "mkdir -p /usr/share/nginx/html/review/$CI_COMMIT_REF_NAME"
- sshpass -p "$SSH_PASSWD" scp -P "$SSH_PORT" -r _book/* $SSH_USER@$HOST_NAME:/usr/share/nginx/html/review/$CI_COMMIT_REF_NAME
- sshpass -p "$SSH_PASSWD" scp -P "$SSH_PORT" -r book_pdf $SSH_USER@$HOST_NAME:/usr/share/nginx/html/review/${CI_COMMIT_REF_NAME}
environment:
name: review/$CI_COMMIT_REF_NAME
url: http://$HOST_NAME$COLON$HTTP_PORT/review/$CI_COMMIT_REF_NAME/
#url: https://$PROXY_HOST_NAME/reviews/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME/
on_stop: stop_review
only:
- branches
tags:
- development
except:
- master
stop_review:
stage: review
variables:
GIT_STRATEGY: none
script:
- sshpass -p "$SSH_PASSWD" ssh -p "$SSH_PORT" $SSH_USER@$HOST_NAME "rm -rf /usr/share/nginx/html/review/$CI_COMMIT_REF_NAME"
when: manual
environment:
name: review/$CI_COMMIT_REF_NAME
action: stop
only:
- branches
tags:
- development
except:
- master
deploy:
stage: deploy
only:
- master
tags:
- production
script:
- sshpass -p "$SSH_PASSWD" ssh -p "$SSH_PORT" $SSH_USER@$HOST_NAME "mkdir -p /usr/share/nginx/html/production"
- sshpass -p "$SSH_PASSWD" scp -P "$SSH_PORT" -r _book/* $SSH_USER@$HOST_NAME:/usr/share/nginx/html/production
environment:
name: production
# url: http://$HOST_NAME$COLON$HTTP_PORT/production/
url: https://fizban05.rz.tu-harburg.de/$CI_PROJECT_PATH/
# Introduction
# Summary
* [Introduction](README.md)
{
"plugins": [
"image-captions"
],
"pluginsConfig": {
"image-captions": {
"align": "left",
"caption": "Abbildung: _PAGE_LEVEL_._PAGE_IMAGE_NUMBER_ - _CAPTION_",
"images": {
"1.1.1": {
"skip": false
}
}
},
"downloadpdf": {
"base": "./book_pdf/book.pdf?",
"label": "PDF laden",
"multilingual": false
}
},
"styles": {
"website": "/styles/website.css",
"pdf": "/styles/pdf.css"
},
"language": "de",
"gitbook": "3.2.2",
"pdf": {
"paperSize": "a4"
},
"author": "Axel Dürkop, Michael Heinemann",
"description": "Begleitendes Skript für die Veranstaltung Einführung in die Informationstechnik am ITBH der TUHH, SoSe 2017",
"title": "Einführung in die Informationstechnik",
"colors": {
"sidebarBackground": "#128a84",
"partHeaderColor": "#fff",
"sidebarLinkActive": "#fff"
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment