Skip to content
Snippets Groups Projects
Commit 826b695d authored by Michael Blaschek's avatar Michael Blaschek :bicyclist:
Browse files

Merge branch 'master' of gitlab.phaidra.org:imgw/computer-resources

parents 10348186 f0e4d868
No related branches found
No related tags found
No related merge requests found
#image: localhost:5000/mkdocs-imgw
image: python:3.9-buster
# Install all required packages
before_script:
- pip install -r requirements.txt
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
# Cache between jobs in the same branch
cache:
- key: $CI_COMMIT_REF_SLUG
- paths:
- .cache/pip
stages:
- build
- deploy
Build:
build:
stage: build
rules:
# only run pipeline when build is in the commit message
- if: $CI_COMMIT_MESSAGE =~ /.*build.*/
- if: $MY_VARIABLE
before_script:
# Install all required packages
- pip install -r requirements.txt
script:
- mkdocs build --strict --verbose
# --strict is too strict :)
- mkdocs build -c --verbose
artifacts:
paths:
- mkdocs.log
cache:
key: build-cache
paths:
- site/
Deploy:
deploy:
stage: deploy
needs:
- build
before_script:
- apt-get update -qq && apt-get install -y -qq sshpass openssh-client rsync
script:
- sshpass -p "$WOLKE_PASSWORD" scp -r /tmp/cr-site/ $WOLKE_USER@wolke.img.univie.ac.at:/var/www/html/documentation/general/
# - sshpass -p "$WOLKE_PASSWORD" scp -oStrictHostKeyChecking=no -r ./site/* $WOLKE_USER@wolke.img.univie.ac.at:/var/www/html/documentation/general/
- sshpass -p "$WOLKE_PASSWORD" rsync -atv --delete -e "ssh -o StrictHostKeyChecking=no" ./site/ $WOLKE_USER@wolke.img.univie.ac.at:/var/www/html/documentation/general
cache:
key: build-cache
paths:
- site/
......@@ -2,7 +2,7 @@ site_name: Computer Resources @ IMGW
# default is ./site/
# could change this to /var/www/html/docs
site_url: "https://wolke.img.univie.ac.at/documentation/general/"
site_dir: "/tmp/cr-site/"
site_dir: "./site/"
# site_dir: "/var/www/html/documentation/general/"
docs_dir: "."
repo_url: https://gitlab.phaidra.org/imgw/computer-resources
......@@ -36,6 +36,7 @@ plugins:
- exclude:
glob:
- testing/*
- site/*
extra:
social:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment