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

added cache to jobs, build

parent e4f92f69
Branches
Tags
No related merge requests found
#image: localhost:5000/mkdocs-imgw
image: python:3.9-buster
# Install all required packages
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
......@@ -9,9 +16,12 @@ stages:
build:
rules:
# only run pipeline when build is in the commit message
- if: $CI_COMMIT_MESSAGE =~ /.*build.*/
stage: build
before_script:
# Install all required packages
- pip install -r requirements.txt
script:
# --strict is too strict :)
......@@ -19,6 +29,10 @@ build:
artifacts:
paths:
- mkdocs.log
cache:
key: build-cache
paths:
- site/
deploy:
stage: deploy
......@@ -28,3 +42,7 @@ deploy:
- apt-get update -qq && apt-get install -y -qq sshpass openssh-client
script:
- sshpass -p "$WOLKE_PASSWORD" scp -oStrictHostKeyChecking=no -r ./site/ $WOLKE_USER@wolke.img.univie.ac.at:/var/www/html/documentation/general/
cache:
key: build-cache
paths:
- site/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment