Commit 63fc625e authored by Thomas Fragner's avatar Thomas Fragner
Browse files

Update .gitlab-ci.yml

parent 79ce3f87
Pipeline #111 passed with stages
in 1 minute and 6 seconds
......@@ -5,6 +5,7 @@ image: meroff/hugo-with-pandoc
stages:
- build
- combine
- review
- publish
.build-prepare:
......@@ -52,6 +53,44 @@ combine:
only:
- master
review:
image: meroff/hugo-deploy
stage: review
before_script:
- eval $(ssh-agent -s)
- echo "$PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- ssh-keyscan -p 2122 deploy.ce.jku.at > ~/.ssh/known_hosts
script:
- rsync -av -e "ssh -p 2122" --delete public "deploy@deploy.ce.jku.at:~/data/deploy/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_COMMIT_REF_NAME/"
environment:
name: review/$CI_BUILD_REF_NAME
url: http://deploy.ce.jku.at/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_COMMIT_REF_NAME
on_stop: stop_review
only:
- branches
except:
- master
stop_review:
image: meroff/hugo-deploy
stage: review
before_script:
- eval $(ssh-agent -s)
- echo "$PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- ssh-keyscan -p 2122 deploy.ce.jku.at > ~/.ssh/known_hosts
script:
- ssh -p 2122 deploy@deploy.ce.jku.at "rm -rf ~/data/deploy/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_COMMIT_REF_NAME"
variables:
GIT_STRATEGY: none
when: manual
environment:
name: review/$CI_BUILD_REF_NAME
action: stop
pages:
stage: publish
script:
......
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