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

Merge branch '1-live-und-preview' into 'master'

Add new file

Closes #1

See merge request !1
parents 85e2bbf7 f4ea0a79
Pipeline #4413 passed with stages
in 21 seconds
variables:
COLON: ':'
stages:
- build
- review
- deploy
build:
stage: build
only:
- branches
tags:
- development
script:
- gitbook install
- gitbook build
artifacts:
name: "${CI_BUILD_NAME}_${CI_BUILD_REF_NAME}"
paths:
- _book
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_BUILD_REF_NAME"
- sshpass -p "$SSH_PASSWD" scp -P "$SSH_PORT" -r _book/* $SSH_USER@$HOST_NAME:/usr/share/nginx/html/review/$CI_BUILD_REF_NAME
environment:
name: review/$CI_BUILD_REF_NAME
#url: http://$HOST_NAME$COLON$HTTP_PORT/review/$CI_BUILD_REF_NAME/
url: https://$PROXY_HOST_NAME/reviews/$CI_PROJECT_PATH/$CI_BUILD_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_BUILD_REF_NAME"
when: manual
environment:
name: review/$CI_BUILD_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://$PROXY_HOST_NAME/$CI_PROJECT_PATH/
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