diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a29b5db0023658c15437d4e79b13b9c11b3cfa53..f4135abb59044d6463f00b8d1c53f264161015d6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,19 +5,25 @@ stages: build: stage: build + image: monachus/hugo script: - - echo Build my page + - hugo + cache: + key: ${CI_COMMIT_REF_SLUG} + paths: + - resources/ artifacts: paths: - - public + - public/ expire_in: 1 hour review: stage: review + image: instrumentisto/rsync-ssh before_script: - 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )' - eval $(ssh-agent -s) - - echo "$SSH_PRIVATE_PRE" | tr -d '\r' | ssh-add - + - echo "$SSH_PRIVATE_PRE" | base64 -d | tr -d '\r' | ssh-add - - mkdir -p ~/.ssh - chmod 700 ~/.ssh - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' @@ -32,10 +38,11 @@ review: stop_review: stage: review + image: instrumentisto/rsync-ssh before_script: - 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )' - eval $(ssh-agent -s) - - echo "$SSH_PRIVATE_RM" | tr -d '\r' | ssh-add - + - echo "$SSH_PRIVATE_RM" | base64 -d | tr -d '\r' | ssh-add - - mkdir -p ~/.ssh - chmod 700 ~/.ssh - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' @@ -50,10 +57,11 @@ stop_review: production: stage: production + image: instrumentisto/rsync-ssh before_script: - 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )' - eval $(ssh-agent -s) - - echo "$SSH_PRIVATE_PROD" | tr -d '\r' | ssh-add - + - echo "$SSH_PRIVATE_PROD" | base64 -d | tr -d '\r' | ssh-add - - mkdir -p ~/.ssh - chmod 700 ~/.ssh - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'