Commit 3c315574 authored by Andreas Böttger's avatar Andreas Böttger 😬

Update .gitlab-ci.yml

parent d1ba3878
Pipeline #13665 failed
...@@ -49,10 +49,32 @@ review:stop: ...@@ -49,10 +49,32 @@ review:stop:
deploy: deploy:
stage: deploy stage: deploy
only: only:
- master
except:
- schedules - schedules
tags: tags:
- production - production
#when: manual when: manual
script:
- pwd
- sudo docker pull docker.rz.tu-harburg.de:5000/docker/jekyll-glr:latest
# `_layouts/home.html` kann datumsabhängig mit einer Datei aus `backlogs` überschrieben werden
- find backlog -regextype egrep -regex "backlog/[0-9]{8,8}_.*" | sort | awk -F'/|_' -v date=$(date +%Y%m%d) '{if ($2 <= date) {print("cp backlog/"$2"_home.html _layouts/home.html"); system("cp backlog/"$2"_home.html _layouts/home.html")}}'
- sudo docker run --rm -v $(pwd):/source docker.rz.tu-harburg.de:5000/docker/jekyll-glr:latest install
- sudo docker run --rm -v $(pwd):/source docker.rz.tu-harburg.de:5000/docker/jekyll-glr:latest build
- 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 _site/* $SSH_USER@$HOST_NAME:/usr/share/nginx/html/production
environment:
name: production
url: https://$PROXY_HOST_NAME/
deploy:on-schedule:
stage: deploy
only:
- schedules
- master
tags:
- production
script: script:
- pwd - pwd
- sudo docker pull docker.rz.tu-harburg.de:5000/docker/jekyll-glr:latest - sudo docker pull docker.rz.tu-harburg.de:5000/docker/jekyll-glr:latest
......
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