diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f5121b189cda7012dea2e9e37eb62d37ca736939..e3038ad453ec57e418211ef57604a7852a72fc79 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,10 +1,25 @@ variables: + BASE_URL: "http://10.71.110.145/hcc-docs" DEPLOY_ROOT: "/var/www/html/hcc-docs" + HUGO_TARBALL: "https://github.com/gohugoio/hugo/releases/download/v0.49.2/hugo_0.49.2_Linux-64bit.tar.gz" GIT_SUBMODULE_STRATEGY: recursive stages: + - test - deploy +test: + stage: test + image: unlhcc/docker-glibc + except: + - master + tags: + - docker + before_script: + - curl -L -o - ${HUGO_TARBALL} | tar -zxv -C /usr/local/bin + script: + - hugo -v + deploy: stage: deploy environment: @@ -15,5 +30,5 @@ deploy: tags: - docs-test script: - - hugo -v + - hugo -b ${BASE_URL} -v - rsync -avz --delete public/ $DEPLOY_ROOT