From cae595f6ea399dbf822da3cb7163c2b651c3a382 Mon Sep 17 00:00:00 2001 From: Marc Riera Irigoyen Date: Sun, 28 Jun 2020 20:30:12 +0200 Subject: [PATCH] Build and deploy in CI --- .gitlab-ci.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5124abf..32fbf6e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,11 +3,19 @@ image: monachus/hugo variables: GIT_SUBMODULE_STRATEGY: recursive +before_script: + - apt-get update + - apt-get --yes install rsync + build: + stage: build script: - hugo artifacts: paths: - public - only: - - master + +deploy: + stage: deploy + script: + - rsync -hrv --delete public/ /var/opt/gitlab-runner/builds/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/